Steps to Reproduce:
After not being able to update VS Code and having my issue here closed, I attempted to uninstall the program. The uninstaller did not remove all of the files so I attempted to delete them manually. When I try to delete Code.exe, it says "The action can't be completed because the file is open in System"
ProcessExplorer is unable to find anything when I include the filename Code.exe and Unlocker is unable to delete the file.
I am basically out of business as far as VS Code is concerned and have to use Atom or some other editor until I can get this resolved.
Can you delete after restarting?
I was having the same issue trying to update VS Code to 1.33.0, but a system restart resolved it. Why? I have no idea.
I'm having a similar issue, too. I haven't been able to update in weeks because it says that Code.exe is open in System. Tonight, I wasn't able to run any Python commands in the integrated terminal. Then, my system crashed (I'm not sure that that had to do with this issue), and on restart, launching Code resulted in this error:

I decided to do an uninstall and start fresh, but the Windows uninstaller couldn't remove Code.exe for the same reason, and I can't even delete it. When I try to launch it, I get this error:

This second error was after trying to uninstall, so that may be contributing to the issue.
I'm at a complete loss as to what to do.
I麓m with the same problem!
@joaomoreno Any chance there's a fix for this? VSCode is my preferred IDE, but it's completely unusable and inaccessible as is.
@kydojo Can you use Process Hacker to figure out what's the full command line of that runaway Code.exe process?
I'm with the same problem and i thought the restart/uninstall would help... Now i can't even reinstall VSCode because of this apparent process running in the background..
@joaomoreno I'm on a tight deadline with a project right now, but I will definitely do that next week and report back. Thanks
I uninstalled VSCode (user) as far as possible, although Code.exe and others were stubborn due to the "Code.exe process". Then i reinstalled the VSCode System version. Fixed all problems for me.
I could then go into the C:\Users\myuserAppData\Local\Programs\Microsoft VS Code path and delete the remains of the user install. I haven't had problems with the System install yet.
I hope you guys can use this info for your problems.
Is there a fix for this? No luck with the ideas posted here.
Tried Veng97's idea but no luck. Could not even change the rights to the file, even the read permissions are gone.
The same problem here, VS Code 1.41.0. Restart/uninstall didn't help, Code.exe was blocked by System..
The Veng97's fix did work.
Same problem here.
Can't launch, Uninstall or reinstall VS. |:
Cannot delete code.exe in any way.
Background update causes this problem. User setup is no longer available.
Re-logging did not work to delete Code.exe, but rebooting did
Uninstall, Reinstall, Reboot did not work. Ended up starting up in safe mode and deleting the folder AppData/Local/Programs/Microsoft VS Code. Rebooted and reinstalled and all was good.
Same issue just happened during an auto-update on my vsc. (win 10 v1909)
I am having the exact same issue
Having this issue now as well. Is there no resolution?
Having this issue now as well. Is there no resolution?
I wasn't ever able to find one, albeit, I haven't tried in months. I started a new job, and VS Code isn't an approved IDE there, so I haven't had a reason to try to fix it.
I got it to work by starting the computer in safe mode, and even though I was administrator and had this problem, for some reason this gave me the ability to delete Code.exe, and then reinstall. Really annoying problem, and I still have no idea what the real problem is, other than that it was connected with a background update.
Note: Make sure to extract your userSettings.json if you have any so afterward it'll be the like the issue newer even occurred. same icons, same color schema, same theme, etc.
Wow, working in vs code. closed vs code. vs code tried to update and BOOM "access denied" permissions failure. Why? Because of a microsoft security measure. I go to fix ownership and BOOM code.exe inside directory is missing a container ... WHAT AM I TO DO NOW!
I had the same issue, and the Sade Mode method did work. Microsoft should probably fix this?
Having the same issue - this is the second time that inno_updater.exe wasn't able to work fully, and it wasn't possible to uninstall; code.exe and inno_updater.exe cannot be deleted - even after a reboot. I love code, but the updating always seems to be a pain on Windows (it seems OK on macOS, but it always seems a bit janky as it runs at odd times).
Same issue here: automatic updater did stuck on code.exe that could not be replaced. Aborted installation. Manually un-installed using the add or remove program. Then ran VSCodeUserSetup-x64-1.47.2, still same issue. So aborted again. Went to C:\Users\pthiviergeAppData\Local\Programs\Microsoft VS Code using a file explorer with administrative right, deleted code.exe, AND AFTER BEING DELETED, F5 to REFESH AND CODE IS COMING BACK! realised that SYSTEM has a handle on the file !??? I'll try to reboot. Perhaps some mecanism I don't understand in the user folder. I'll give it a shot with the SYSTEM installer instead, my guess is this could work in a more standard way as it requires more rights to be installed...
@pthivierge - that's exactly what I saw. I rectified it by booting in Safe Mode, and then deleting the file from there. Then I could reboot normally and reinstall.... until the next update!
I have had this issue on two computers now. The best way I found to fix it was:
If you had issues deleting the VS Code folder in safe mode you will need to create a bootable drive and delete it from there. Below are some links to help you with this process.
https://support.microsoft.com/en-us/help/15088/windows-10-create-installation-media
https://www.tenforums.com/tutorials/21756-boot-usb-drive-windows-10-pc.html#option1
Hey @joaomoreno, this issue might need further attention.
@mthelm85, you can help us out by closing this issue if the problem no longer exists, or adding more information.
Having the same issue presently
Most helpful comment
Same problem here.
Can't launch, Uninstall or reinstall VS. |:
Cannot delete code.exe in any way.