Skip to content

Can't update VS Code - access denied on Code.admx file #157341

@andysterland

Description

@andysterland

Note there is a related issue at: #150287. I can work around the issue by running the update as admin/granting access to the file but filling the issue as that's probably not what should happen.

  • VS Code Version: 1.67.1
  • OS Version: Windows 11 - 22H2 - 22621.450

Steps to Reproduce

  1. Update VS Code from the prompt in VS Code

Expected

Update, no issue.

Actual

Error message "Access is denied" to the code.admx file (details below). I'm not running VS Code.
image

Extra Information

Error Message

There was an error while Opening file handle: "C:\Users\andster\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.

Log

vscode-inno-updater-1659735052.log

Not running a code.exe process

There are no Visual Studio Code processes still executing and no handles to the file are open (not that you'd expect it to help as the issues seems to be a missing ACL).
PS C:\tools\SysInternals> .\handle.exe |findstr /i "Code.admx"
PS C:\tools\SysInternals>

PS C:\Users\andster> Get-Process code.exe
Get-Process : Cannot find a process with the name "code.exe". Verify the process name and call the cmdlet again.

VS Code info

Version: 1.67.1 (user setup)
Commit: da15b6f
Date: 2022-05-06T12:37:03.389Z (3 mos ago)
Electron: 17.4.1
Chromium: 98.0.4758.141
Node.js: 16.13.0
V8: 9.8.177.13-electron.0
OS: Windows_NT x64 10.0.22621

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions