Another way if you want to use the command prompt (since I am lazy), do where code and delete them like this:
You can check which env variable paths take precedence by typing this in the command line (won’t work in PowerShell):
where code
My cursor path was in system variables while my vscode path was in user variables. It seems that system variables take precedence, so I fixed this by moving cursor path from system variables to user variables and making sure it came after the vscode path:
As has been stated by multiple responses here, deleting the code entries doesn’t stick as they get re-added whenever Cursor updates (which is frequently)
The reason this issue persists is because of during initial Cursor install you chose the option of adding the command to PATH (which also adds code).
Changing PATH precedence or removing cursor entirely may also have issues. As Cursor keeps adding back its bin folder during update (may need confirmation)
Uninstalling and re-installing will also not work as you will not be asked to choose the PATH option.
Fixing the underlying issue
An option that does work is 1) uninstalling, 2) deleting all Cursor data folders, then 3) installing afresh, which allows you to change the Install option to not add it to PATH.
deleting cursor folders: after uninstall, delete these folders:
%USERPROFILE%\AppData\Local\Programs\cursor*
%USERPROFILE%\AppData\Local\Cursor*
%USERPROFILE%\AppData\Roaming\Cursor*
%USERPROFILE%\cursor*
as listed here
Thanks!
Same, everytime i delete the code.cmd file from cursor , when opening it rewrites it.
This is what I did, seems to work: Installing "cursor" shell command overrides "code" as well - #6 by yjmantilla . Or basically:
Problem: Everytime i open cursor it rewrites the files so i need to continuously delete the files.
I converged to instead of deleting the file, just edit the code.cmd from cursor to call the right code.cmd from vscode. E.g:
@echo off
call "Y:\software\Microsoft VS Code\bin\code.cmd" %*
seems to do the trick.
→ this helped me
- run this command after win+R
- And Type %localappdata%\Programs\cursor\resources\app\bin
Delete
- code
- code
This solution is working on windows
This really needs to be fixed permanently. We should not have to resort to “hacks” to allow us to use VSCode alongside Cursor.
I need to use VSCode mainly because I need to use the C# extension provided by Microsoft and I can only do this with VSCode.
Typing code . is a convenience that many users would prefer rather than starting VSCode manually and then for example, opening a remote WSL session.
If this is unintentional as @deanrie says, perhaps it needs to be explained why this is happening. I also didn’t quite understand his solution “You can install both commands, but for VSCode, install it directly from there, and for Cursor, install it directly from Cursor.”
Hey, sorry, maybe I wasn’t quite clear. For this to work, you need to install the shell command for Cursor from Cursor and for VS Code from VS Code. Does that make sense? If you install both commands from Cursor, they will both open Cursor.
Hi all, we are working on fixing this for Windows. We expect to have this fixed in the 1.4 release of Cursor.
This makes no sense.
If you install both commands from Cursor, they will both open Cursor.
I have never installed any shell command, nor can I see where to install shell commands.
All I know is that your software places a code and code.cmd file inside of the cursor executable location. If I delete them, they come back with the next update and don’t want to eff around with updating system paths so that when I type in code I don’t launch cursor.


