vscode: Unable to update VSCode: error while opening file handle ... code.admx

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version: 1.67.1
  • OS Version: Win 11 21H2 build 22000.675

Steps to Reproduce:

  1. Choose Restart to update VSCode
  2. Error while updating: "There was an error while Opening file handle: “C:\Users\NAME\AppData\Local\Programs\Microsoft VS Code\policies\Code.admx”: Failed to create file handle: Access is denied. Please verify there are no Visual Studio Code processes still executing.
  3. When I click Cancel I get the error Failed to install Visual Studio Code update. Updates may fail due to anit-virus software and/or runaway processes. Please try restarting your machine before attempting to update again
  4. Reboot.
  5. Start VSCode.
  6. Choose Restart to update VSCode
  7. Same error

vscode-inno-updater-1653404335.log vscode-inno-updater-1653404875.log

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 16
  • Comments: 15 (3 by maintainers)

Most upvoted comments

I can’t update to VS Code 1.67.2 because I can’t update 😃

I had this exact same error, but if you right click -> run as administrator -> and then check for updates… mine finished the updates that way.

Had the same issue. Opening VSCode as admin allows to update though.

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.67.2. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

I had this exact same error, but if you right click -> run as administrator -> and then check for updates… mine finished the updates that way.

It works for me.

I had this exact same error, but if you right click -> run as administrator -> and then check for updates… mine finished the updates that way.

thanks bro … It works for me too.

Running icacls "%LOCALAPPDATA%\Programs\Microsoft VS Code" /grant "%USERDOMAIN%\%USERNAME%":F /T from an admin command prompt is another workaround. See #147408.

This works for me, thanks!

I had this exact same error, but if you right click -> run as administrator -> and then check for updates… mine finished the updates that way.

Just a minor thing. The user must close all VSCode before launching a new VSCode as administrator.

I had this exact same error, but if you right click -> run as administrator -> and then check for updates… mine finished the updates that way.

thanks a lot