Vs code ошибка при обновлении

I am trying to update my VS Code but am getting an error message: Updates may fail due to anti virus software and/or runaway processes.

A log file stemming from my Users was attached, but I am not sure what to check for. I am still new to computers and programming.

asked Nov 8, 2020 at 21:28

romanxyz123's user avatar

1

I copied the Code.exe file from where my program was installed and pasted it to the temp map: C:UsersYOUR_USERNAMEAppDataLocalProgramsMicrosoft VS Code
I reran the update and it works.

answered Feb 22, 2021 at 18:27

Aventis's user avatar

AventisAventis

1212 silver badges5 bronze badges

Run the update setup file, with a name like «CodeSetup-stable-…exe», in the following location:

C:Users<:User>AppDataLocalTempvscode-update-system-x64

Replace <:User> with your username. And make sure VS Code is closed.

The same problem happened to me as well. It was because I installed VS Code in another directory other than the default location. The problem happened because after downloading the update in the Temp directory, VS Code tried to locate the previous installation in the default location to update it. As it failed, the update setup file remained with the temporary files. The problem was solved by manually installing the update.

answered Oct 14, 2021 at 7:52

Shashoto Nur's user avatar

This is how I resolved the problem:

  1. Close VSCode.
  2. Run VSCode AS ADMINISTRATOR by right clicking in the VS Code icon. This process opens VScode.
  3. Now run the same VSCODE update as usual from inside VSCode.
  4. VSCode closes after the update process and the latest VSCODE version is installed.

Nimantha's user avatar

Nimantha

6,5196 gold badges27 silver badges68 bronze badges

answered May 31, 2022 at 19:29

Jose P Fernandez's user avatar

0

This happens because you installed VSCode in a specific directory, delete and download again but leave the default directory. This is because the update file looks for the default directory

answered Jul 14, 2021 at 16:53

Josué Mendonça's user avatar

This problem appeared to me because I moved the files of the setup of the vscode from Partition to another, and the solution was very simple. I opened the file that was in the path that appeared in the alert, and the problem was solved.

Just make sure any instance vscode was closed!

answered Aug 27, 2022 at 18:17

Marim mohamed's user avatar

While checking and installing updates for Visual Studio Code on a Microsoft Windows 10 Version 1909 (OS Build 18636.719), vscode icon disappears and updates do not complete and throw an error with this message:

«Updates may fail due to anti-virus software and/or runaway processes. Please try restarting your machine before attempting to update again.»

I’ve checked all this and everything is good. What I noticed was that the path to the actual executable file (Code.exe) is located in the underscore sub-folder and not in the parent Microsoft VS Code folder (i.e, «C:Users<username>AppDataLocalProgramsMicrosoft VS Code_Code.exe» ).

The target location is set to (i.e, «C:Users<username>AppDataLocalProgramsMicrosoft VS CodeCode.exe») and not (i.e, «C:Users<username>AppDataLocalProgramsMicrosoft VS Code_Code.exe»). I have include a screenshot for your convenience.

Thank you.

2020-03-10_16-23-50

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.

Already on GitHub?
Sign in
to your account

Assignees

@joaomoreno

Labels

bug

Issue identified by VS Code Team member as probable bug

insiders-released

Patch has been released in VS Code Insiders

install-update

VS Code installation and upgrade system issues

verified

Verification succeeded

windows

VS Code on Windows issues

Comments

@andrewrice

Issue Type: Bug

When checking for updates, receive prompt saying the following:

«C:UsersmyusernameAppDataLocalProgramsMicrosoft VS Code_chrome_100_percent.pak
An error occurred while trying to create a file in the destination directory: Access is denied»

Available options are:

  • Try again
  • Skip this file
  • Cancel installation.

First two options immediately bring prompt the error again, cancel installation suppresses it until auto-update re-attempts the installation.

Error occurs when running as administrator as well.

VS Code version: Code 1.66.1 (8dfae7a, 2022-04-06T14:50:12.141Z)
OS version: Windows_NT x64 10.0.19043
Restricted Mode: No

System Info

Item Value
CPUs AMD Ryzen 9 3900X 12-Core Processor (24 x 3800)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 31.95GB (22.02GB free)
Process Argv —crash-reporter-id 117dd477-59c8-4487-9ba4-aff765032dc6
Screen Reader no
VM 0%

Extensions (1)

Extension Author (truncated) Version
prettier-vscode esb 9.5.0

A/B Experiments

vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492cf:30256860
pythonvspyl392:30443607
pythontb:30283811
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
vscod805:30301674
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
vsc1dst:30438360
pythonvs932:30410667
wslgetstarted:30449410
pythonvsnew555:30457759
vscscmwlcmt:30465135
cppdebugcf:30466690

bevis-hobbs, bh-bh-bh, yalaudah, andreipana, paulnelson13099, zurcher, RyanCavanaugh, byehack, elahehrashedi, ChadMcCaffery, and 4 more reacted with thumbs up emoji
heaths reacted with eyes emoji

@darkvertex

The autoupdate kept failing and I figured «Oh, autoupdate is borked, let me just install the latest installer..«

but nope, that fails too:

image

🤔

@darkvertex

…aaaand now my install is corrupt, great:

image


Error text if it helps:

Uncaught Exception:
Error: Cannot find module 'C:UsersalanAppDataLocalProgramsMicrosoft VS Coderesourcesappoutmain'
    at Module._resolveFilename (node:internal/modules/cjs/loader:987:15)
    at Function.o._resolveFilename (node:electron/js2c/browser_init:253:840)
    at Object.<anonymous> (node:electron/js2c/browser_init:193:3263)
    at Object../lib/browser/init.ts (node:electron/js2c/browser_init:193:3507)
    at __webpack_require__ (node:electron/js2c/browser_init:1:128)
    at node:electron/js2c/browser_init:1:1200
    at node:electron/js2c/browser_init:1:1267
    at NativeModule.compileForInternalLoader (node:internal/bootstrap/loaders:312:7)
    at NativeModule.compileForPublicLoader (node:internal/bootstrap/loaders:252:10)
    at loadNativeModule (node:internal/modules/cjs/helpers:49:9)

@derkrasseleo

I got the same error message after trying to upgrade via winget

@ruudhanegraaf

Ditto here, but here the reported file is unins000.exe instead of chrome_100_percent.pak.

@Absolucy

Here, the reported file is resources/app/out/bootstrap-amd.js.

@the-chain-gamer

same issue here. started happening since yesterday.

@connor-yu4322

Same issue, if i skip file it just keeps going through every single file.

@Erijoda

Seems the permissions were borked on my install.

I was able to fix it by changing the permissions.

If you have administrator access with your user then you should be able to fix it with these steps:

Step 1) Open CMD.EXE as administrator (with your user)

Step 2) Run: takeown /F "%LOCALAPPDATA%ProgramsMicrosoft VS Code" /R /D Y

Step 3) Run: icacls "%LOCALAPPDATA%ProgramsMicrosoft VS Code" /inheritance:r /remove "NT SERVICETrustedInstaller" /grant:r "%USERDOMAIN%%USERNAME%":(F) /grant:r "CREATOR OWNER":(OI)(CI)(IO)(F) /grant:r "BUILTINUsers":(OI)(CI)(RX) /grant:r "NT AUTHORITYAuthenticated Users":(OI)(CI)(RX) /grant:r "BUILTINAdministrators":(OI)(CI)(F) /grant:r "NT AUTHORITYSYSTEM":(OI)(CI)(F)

If you don’t have administrator then the easiest way to fix would be to have someone with administrator change the owner of folder, subfolder and files in %LOCALAPPDATA%ProgramsMicrosoft VS Code, using Windows Explorer’s Properties > Security > Advanced.
Once you are the owner you can run the command in Step 3 without administrator.

ruudhanegraaf, Absolucy, darkvertex, mining-visualizer, ntaylor-86, MrBrax, libingqin, stuartleeks, yonghenghuanmie, mrapan, and 36 more reacted with thumbs up emoji
darkvertex, mining-visualizer, yalaudah, evertonberz, froehlichcr, KareemSarhan, giorgiusharauli, anujp31, xorf8, hund030, and 2 more reacted with hooray emoji
darkvertex, mining-visualizer, yalaudah, jeff-markham, vchske, VonOgre, evertonberz, pedershk, froehlichcr, KareemSarhan, and 10 more reacted with heart emoji
froehlichcr, KareemSarhan, giorgiusharauli, anujp31, xorf8, ihigg, and Ad-Bean reacted with rocket emoji

@ruudhanegraaf

Thanks, Erijoda. This also fixed it for me. :-)

Step 3 for people with non-English Windows:

icacls «%LOCALAPPDATA%ProgramsMicrosoft VS Code» /inheritance:r /remove «NT SERVICETrustedInstaller» /grant:r «%USERDOMAIN%%USERNAME%»:(F) /grant:r «*S-1-3-0»:(OI)(CI)(IO)(F) /grant:r «*S-1-5-32-545»:(OI)(CI)(RX) /grant:r «*S-1-5-11»:(OI)(CI)(RX) /grant:r «*S-1-5-32-544»:(OI)(CI)(F) /grant:r «*S-1-5-18»:(OI)(CI)(F)

@darkvertex

Thank you @Erijoda it fixed it for me too. 🎉

I was able to run the installer after your steps and my VSCode boots up like normal again. 😅

@joaomoreno

@Erijoda What is the actual permissions difference between what VS Code set and what you set in that command?

This is what VS Code is using today:

Permissions := /grant:r «*S-1-5-18:(OI)(CI)F» /grant:r «*S-1-5-32-544:(OI)(CI)F» /grant:r «*S-1-5-11:(OI)(CI)RX» /grant:r «*S-1-5-32-545:(OI)(CI)RX»;
#if «user« == InstallTarget
Permissions := Permissions + /grant:r «*S-1-3-0:(OI)(CI)F»;
#endif
Exec(ExpandConstant({sys}icacls.exe), ExpandConstant(«{app}» /inheritancelevel:r ) + Permissions, , SW_HIDE, ewWaitUntilTerminated, ResultCode);
end;

@joaomoreno
joaomoreno

added

bug

Issue identified by VS Code Team member as probable bug

install-update

VS Code installation and upgrade system issues

windows

VS Code on Windows issues

labels

Apr 21, 2022

@rainersigwald

I just ran into this myself.

---------------------------
Visual Studio Code
---------------------------
There was an error while Opening file handle: "C:\Users\raines\AppData\Local\Programs\Microsoft VS Code\resources\app\out\bootstrap-amd.js":

Failed to create file handle: Access is denied.



Please verify there are no Visual Studio Code processes still executing.
---------------------------
Retry   Cancel   
---------------------------
icacls "C:\Users\raines\AppData\Local\Programs\Microsoft VS Code\resources\app\out\bootstrap-amd.js"
C:\Users\raines\AppData\Local\Programs\Microsoft VS Code\resources\app\out\bootstrap-amd.js BUILTINAdministrators:(I)(F)
                                                                                                      BUILTINUsers:(I)(RX)
                                                                                                      NT AUTHORITYAuthenticated Users:(I)(RX)
                                                                                                      NT AUTHORITYSYSTEM:(I)(F)

Successfully processed 1 files; Failed processing 0 filesicacls "C:\Users\raines\AppData\Local\Programs\Microsoft VS Code"
C:\Users\raines\AppData\Local\Programs\Microsoft VS Code NTDEVraines:(F)
                                                               CREATOR OWNER:(OI)(CI)(IO)(F)
                                                               BUILTINUsers:(OI)(CI)(RX)
                                                               NT AUTHORITYAuthenticated Users:(OI)(CI)(RX)
                                                               BUILTINAdministrators:(OI)(CI)(F)
                                                               NT AUTHORITYSYSTEM:(OI)(CI)(F)

Successfully processed 1 files; Failed processing 0 filesicacls "C:\Users\raines\AppData\Local\Programs\Microsoft VS Coderesources"
C:\Users\raines\AppData\Local\Programs\Microsoft VS Coderesources NTDEVraines:(I)(F)
                                                                         CREATOR OWNER:(I)(OI)(CI)(IO)(F)
                                                                         BUILTINUsers:(I)(OI)(CI)(RX)
                                                                         NT AUTHORITYAuthenticated Users:(I)(OI)(CI)(RX)
                                                                         BUILTINAdministrators:(I)(OI)(CI)(F)
                                                                         NT AUTHORITYSYSTEM:(I)(OI)(CI)(F)

Successfully processed 1 files; Failed processing 0 filesicacls "C:\Users\raines\AppData\Local\Programs\Microsoft VS Coderesourcesapp"
C:\Users\raines\AppData\Local\Programs\Microsoft VS Coderesourcesapp NTDEVraines:(I)(F)
                                                                             CREATOR OWNER:(I)(OI)(CI)(IO)(F)
                                                                             BUILTINUsers:(I)(OI)(CI)(RX)
                                                                             NT AUTHORITYAuthenticated Users:(I)(OI)(CI)(RX)
                                                                             BUILTINAdministrators:(I)(OI)(CI)(F)
                                                                             NT AUTHORITYSYSTEM:(I)(OI)(CI)(F)

Successfully processed 1 files; Failed processing 0 filesicacls "C:\Users\raines\AppData\Local\Programs\Microsoft VS Coderesourcesappout"
C:\Users\raines\AppData\Local\Programs\Microsoft VS Coderesourcesappout BUILTINAdministrators:(I)(F)
                                                                                 CREATOR OWNER:(I)(OI)(CI)(IO)(F)
                                                                                 BUILTINUsers:(I)(OI)(CI)(RX)
                                                                                 NT AUTHORITYAuthenticated Users:(I)(OI)(CI)(RX)
                                                                                 BUILTINAdministrators:(I)(OI)(CI)(IO)(F)
                                                                                 NT AUTHORITYSYSTEM:(I)(OI)(CI)(F)

Successfully processed 1 files; Failed processing 0 filesicacls "C:\Users\raines\AppData\Local\Programs\Microsoft VS Code\resources\app\out\*"
C:\Users\raines\AppData\Local\Programs\Microsoft VS Code\resources\app\out\bootstrap-amd.js BUILTINAdministrators:(I)(F)
                                                                                                      BUILTINUsers:(I)(RX)
                                                                                                      NT AUTHORITYAuthenticated Users:(I)(RX)
                                                                                                      NT AUTHORITYSYSTEM:(I)(F)

C:\Users\raines\AppData\Local\Programs\Microsoft VS Code\resources\app\out\bootstrap-fork.js BUILTINAdministrators:(I)(F)
                                                                                                       BUILTINUsers:(I)(RX)
                                                                                                       NT AUTHORITYAuthenticated Users:(I)(RX)
                                                                                                       NT AUTHORITYSYSTEM:(I)(F)

C:\Users\raines\AppData\Local\Programs\Microsoft VS Code\resources\app\out\bootstrap-node.js BUILTINAdministrators:(I)(F)
                                                                                                       BUILTINUsers:(I)(RX)
                                                                                                       NT AUTHORITYAuthenticated Users:(I)(RX)
                                                                                                       NT AUTHORITYSYSTEM:(I)(F)

C:\Users\raines\AppData\Local\Programs\Microsoft VS Code\resources\app\out\bootstrap-window.js BUILTINAdministrators:(I)(F)
                                                                                                         BUILTINUsers:(I)(RX)
                                                                                                         NT AUTHORITYAuthenticated Users:(I)(RX)
                                                                                                         NT AUTHORITYSYSTEM:(I)(F)

C:\Users\raines\AppData\Local\Programs\Microsoft VS Code\resources\app\out\bootstrap.js BUILTINAdministrators:(I)(F)
                                                                                                  BUILTINUsers:(I)(RX)
                                                                                                  NT AUTHORITYAuthenticated Users:(I)(RX)
                                                                                                  NT AUTHORITYSYSTEM:(I)(F)

C:\Users\raines\AppData\Local\Programs\Microsoft VS Code\resources\app\out\cli.js BUILTINAdministrators:(I)(F)
                                                                                            BUILTINUsers:(I)(RX)
                                                                                            NT AUTHORITYAuthenticated Users:(I)(RX)
                                                                                            NT AUTHORITYSYSTEM:(I)(F)

C:\Users\raines\AppData\Local\Programs\Microsoft VS Code\resources\app\out\main.js BUILTINAdministrators:(I)(F)
                                                                                             BUILTINUsers:(I)(RX)
                                                                                             NT AUTHORITYAuthenticated Users:(I)(RX)
                                                                                             NT AUTHORITYSYSTEM:(I)(F)

C:\Users\raines\AppData\Local\Programs\Microsoft VS Code\resources\app\out\nls.metadata.json BUILTINAdministrators:(I)(F)
                                                                                                       BUILTINUsers:(I)(RX)
                                                                                                       NT AUTHORITYAuthenticated Users:(I)(RX)
                                                                                                       NT AUTHORITYSYSTEM:(I)(F)

C:\Users\raines\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs BUILTINAdministrators:(I)(F)
                                                                                        CREATOR OWNER:(I)(OI)(CI)(IO)(F)
                                                                                        BUILTINUsers:(I)(OI)(CI)(RX)
                                                                                        NT AUTHORITYAuthenticated Users:(I)(OI)(CI)(RX)
                                                                                        BUILTINAdministrators:(I)(OI)(CI)(IO)(F)
                                                                                        NT AUTHORITYSYSTEM:(I)(OI)(CI)(F)

C:\Users\raines\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vscode-dts BUILTINAdministrators:(I)(F)
                                                                                                CREATOR OWNER:(I)(OI)(CI)(IO)(F)
                                                                                                BUILTINUsers:(I)(OI)(CI)(RX)
                                                                                                NT AUTHORITYAuthenticated Users:(I)(OI)(CI)(RX)
                                                                                                BUILTINAdministrators:(I)(OI)(CI)(IO)(F)
                                                                                                NT AUTHORITYSYSTEM:(I)(OI)(CI)(F)

Successfully processed 10 files; Failed processing 0 files

I applied Full control to my user (NTDEVraines) with

icacls "C:\Users\raines\AppData\Local\Programs\Microsoft VS Code\resources\app\out\*" /grant NTDEVraines:F
processed file: C:\Users\raines\AppData\Local\Programs\Microsoft VS Code\resources\app\out\bootstrap-amd.js
processed file: C:\Users\raines\AppData\Local\Programs\Microsoft VS Code\resources\app\out\bootstrap-fork.js
processed file: C:\Users\raines\AppData\Local\Programs\Microsoft VS Code\resources\app\out\bootstrap-node.js
processed file: C:\Users\raines\AppData\Local\Programs\Microsoft VS Code\resources\app\out\bootstrap-window.js
processed file: C:\Users\raines\AppData\Local\Programs\Microsoft VS Code\resources\app\out\bootstrap.js
processed file: C:\Users\raines\AppData\Local\Programs\Microsoft VS Code\resources\app\out\cli.js
processed file: C:\Users\raines\AppData\Local\Programs\Microsoft VS Code\resources\app\out\main.js
processed file: C:\Users\raines\AppData\Local\Programs\Microsoft VS Code\resources\app\out\nls.metadata.json
processed file: C:\Users\raines\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs
processed file: C:\Users\raines\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vscode-dts
Successfully processed 10 files; Failed processing 0 files

and got to the new error

---------------------------
Visual Studio Code
---------------------------
There was an error while Opening file handle: "C:\Users\raines\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\bat\language-configuration.json":

Failed to create file handle: Access is denied.



Please verify there are no Visual Studio Code processes still executing.
---------------------------
Retry   Cancel   
---------------------------

A reset did not help

icacls "C:\Users\raines\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\bat\language-configuration.json" /reset
processed file: C:\Users\raines\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\bat\language-configuration.json
Successfully processed 1 files; Failed processing 0 files

So I did icacls "%LOCALAPPDATA%ProgramsMicrosoft VS Code" /grant "%USERDOMAIN%%USERNAME%":F /T to do the whole directory. That appears to have worked, and is hopefully a bit less invasive than the full replacement above.

@yalaudah

Thanks @Erijoda! This fixed it for me as well 😃

This was referenced

May 20, 2022

@sba923

icacls «%LOCALAPPDATA%ProgramsMicrosoft VS Code» /grant «%USERDOMAIN%%USERNAME%»:F /T

will try this next time I face the issue

@PoulChapman

confirmed that running this from an admin cmd prompt fixed the issue
icacls "%LOCALAPPDATA%ProgramsMicrosoft VS Code" /grant "%USERDOMAIN%%USERNAME%":F /T

v-alarioza, VonOgre, royshea, cloudhan, dmauser, Vivihung, duforell, kyoh2014, xorf8, gewarren, and 2 more reacted with thumbs up emoji

@larspassic

If you have administrator access with your user then you should be able to fix it with these steps:

Step 1) Open CMD.EXE as administrator (with your user)

Step 2) Run: takeown /F "%LOCALAPPDATA%ProgramsMicrosoft VS Code" /R /D Y

Step 3) Run: icacls "%LOCALAPPDATA%ProgramsMicrosoft VS Code" /inheritance:r /remove "NT SERVICETrustedInstaller" /grant:r "%USERDOMAIN%%USERNAME%":(F) /grant:r "CREATOR OWNER":(OI)(CI)(IO)(F) /grant:r "BUILTINUsers":(OI)(CI)(RX) /grant:r "NT AUTHORITYAuthenticated Users":(OI)(CI)(RX) /grant:r "BUILTINAdministrators":(OI)(CI)(F) /grant:r "NT AUTHORITYSYSTEM":(OI)(CI)(F)

This worked for me! Thank you @Erijoda !

@sabbour

So is there a workaround? MSFTee here and blocked by the same issue.

@byehack

image
fixed for me.
actually it didn’t show any progression update window after click «Restart to Update»

@naamunds

Running icacls "%LOCALAPPDATA%ProgramsMicrosoft VS Code" /grant "%USERDOMAIN%%USERNAME%":F /T from an admin command prompt fixed it for me.

@heaths

Running icacls "%LOCALAPPDATA%ProgramsMicrosoft VS Code" /grant "%USERDOMAIN%%USERNAME%":F /T from an admin command prompt fixed it for me.

Something like that worked once for me, but with the next update the problem occurred again. It’s a workaround. Something is changing the ACLs, and seems to be happening only for VSCode. Other user-installed programs haven’t exhibited this problem.

@naamunds

Something like that worked once for me, but with the next update the problem occurred again. It’s a workaround. Something is changing the ACLs, and seems to be happening only for VSCode. Other user-installed programs haven’t exhibited this problem.

I just installed another successful update (1.69.0) without any workarounds (not even running it as admin). I think the issue may have been fixed in one of the most recent versions of VS Code.

@marblewraith

Normally i manage everything through winget running as admin.

I hit similar perms issues today moving from 1.68.1 to 1.69.0 with the error coming up as Access denied failed to write file to ~AppDataLocalProgramsMicrosoft VS Codebin, and then following that a similar JS Runtime message to the one above.

Eventually i ended up:

  1. uninstalling (via winget),
  2. manually removing the parent folder (Microsoft VS Code above) and ~AppDataRoamingCode
  3. reinstalling (1.68 via winget)
  4. Running VScode as admin and using the inbuilt updater to get to 1.69.0

Note: Something really weird. Even after i had uninstalled it and removed all the folders. For some reason VScode was still running active processes. I had to go into task manager and manually end them, before it would let me reinstall.

@sba923

This fixed my issue as well. Thanks @Erijoda

Step 1) Open CMD.EXE as administrator (with your user)

Step 2) Run: takeown /F «%LOCALAPPDATA%ProgramsMicrosoft VS Code» /R /D Y

Step 3) Run: icacls «%LOCALAPPDATA%ProgramsMicrosoft VS Code» /inheritance:r /remove «NT SERVICETrustedInstaller» /grant:r «%USERDOMAIN%%USERNAME%»:(F) /grant:r «CREATOR OWNER»:(OI)(CI)(IO)(F) /grant:r «BUILTINUsers»:(OI)(CI)(RX) /grant:r «NT AUTHORITYAuthenticated Users»:(OI)(CI)(RX) /grant:r «BUILTINAdministrators»:(OI)(CI)(F) /grant:r «NT AUTHORITYSYSTEM»:(OI)(CI)(F)

This worked for me, but:

  1. %USERDOMAIN%%USERNAME% should be %USERDOMAIN%%USERNAME% if your account is member of a domain
  2. %USERDOMAIN%%USERNAME% should be %USERNAME% if your account is not member of a domain (the case for my home systems)

@lilgrassin

Another msft-ie here seeing the code.admx failure on both of my work machines:

  • Do you usually OR have you recently ran VS Code as Administrator, using the User Setup?

On my dev machine I may have tried running it as admin once, but not on my laptop (as far as I remember). Both are installed using the regular user installer (no winget, no admin).

  • When you right click the VS Code installation folder (%localappdata%ProgramsMicrosoft VS Code), select Properties, Security, does CREATOR OWNER show up in the list? If you click Advanced, who is listed as the Owner?

Yes, here are the permissions for the VS Code folder on my laptop:
image

Also adding the permissions for the problem file («code.admx»):
image

  • Is your machine domain joined?

Yes for both affected machines.

@makemefeelgr8

Step 3) Run: icacls "%LOCALAPPDATA%

It doesn’t work. BUILTINUsers: No mapping between account names and security IDs was done.

Step 3 for people with non-English Windows:

That one doesn’t work as well. It should be "%USERDOMAIN%%USERNAME%", not "%USERDOMAIN%%USERNAME%".

Are there ANY palns to make VS Code updates work again? Is this the intended workflow? Download default installer, choose Program Files, it installs the app, it fails to update, go to github, copy some commands, repeat every time you need to update. Is VS Code still in alpha, by any chance?

@joaomoreno

Hi all, sorry for the delay here. I got something for you.

The problem, as some people pointed out, is related to the permissions left behind once the Setup finishes installing VS Code. Namely, the CREATOR OWNER identity isn’t working as we expected.

Broken:

image


By setting the correct permissions for the current user, we should be able to create a good model upfront. I’ve created a build with that fix and ran extensive testing including with usernames with spaces and/or non-ASCII characters.

Fixed:

image


If you currently hit this issue, I’d appreciate it if you could download the following Insiders build, install it and show me your Advanced Security Settings dialog, so I can confirm things work fine in your setup?

💾 Download Windows x64 Insiders User Setup

@joaomoreno

Verification:

  1. Install the user setup of VS Code
  2. Verify on the Advanced Security Settings of the %localappdata%ProgramsMicrosoft VS Code Insiders directory that your user has Full control access to This folder, subfolders and files and not just This folder only. Example:

image

@sba923

@joaomoreno I presume the fix modifies existing installations on the next update, and doesn’t only apply to fresh / new installations?

@joaomoreno

@sba923 Correct, though it’s possible that it might not be able to fix permissions on existing broken installations, given that’s a chicken/egg problem. If you’re hitting this issue, I’d suggest simply reinstalling on top of your installation (no need to uninstall first).

@gameprogrammingsteven

For you Microsofties that wanna debug this, or idk, have a soccer match between VS and Windows teams in the studios or something… Here’s a list of the files that say «nope!» to permission updates if you’re not in command line.

inno_updater.exe Failed to enumerate objects in container. Access is denied.
vcruntime140.dll
unins000.exe
One invisible file b/c pathname is too long for dialog box. Has an underscore after the VS Code directory. Might literally be an underscore.

EDIT: While I am unable to change permissions and am in correct directory, I had to modify the path variable used for another drive to successfully process the right directory. for the command(s) above due to installing on D: drive

All of them say «access is denied» and error applying permissions. These are just quick notes I jotted during the four errors. Surprised they weren’t mentioned above. They were skipped by the admin cmd line (I’m admin but not the super/sys admin you have to unlock on every device). I’m guessing if I login with the windows admin account itself, it will work… but…. who wants to have to go through that process every time. Not many normal users are aware that user admins aren’t real admins.

I’m not connected to any domains

@TheJazzDev

Well, after all said and done… I ended up deleting the folder AppDataLocalProgramsMicrosoft VS Code and then i downloaded the latest version on vs code and install it… Everything works fine and i still get to keep my previous settings and extensions…

Labels

bug

Issue identified by VS Code Team member as probable bug

insiders-released

Patch has been released in VS Code Insiders

install-update

VS Code installation and upgrade system issues

verified

Verification succeeded

windows

VS Code on Windows issues

I tried to update VS Code from version 1.52.1 to 1.53.2 on Windows 10. It failed to update and I got the following error message. And the Projects folder (which contain all of my projects) got deleted (I have back-ups of those files, though). No matter how many times I clicked «Retry», it didn’t work.

«The process cannot access the file because it is being used by another process. (os error 32)»

My projects folder and synced to Google Drive and automatically backed up. Could that be the problem? Which other process might be causing the trouble here?

Also, Windows desktop search can’t find Visual Studio Code now. But in Control Panel Programs Programs and Features, I can see Microsoft Visual Studio Code 1.53.2.

Should I just uninstall it, download the new version and reinstall it?

Will that work? Or do I need to do something else before reinstalling? Or is there some way to get the update without uninstalling and reinstalling?

#visual-studio-code #windows-8

#visual-studio-code #windows-8

Вопрос:

Я пытаюсь обновить свой VS Code, но получаю сообщение об ошибке: обновления могут завершаться неудачно из-за антивирусного программного обеспечения и / или запущенных процессов.

Был прикреплен файл журнала, полученный от моих пользователей, но я не уверен, что нужно проверять. Я все еще новичок в компьютерах и программировании.

Комментарии:

1. Было бы полезно, если бы вы могли скопировать и вставить журнал ошибок здесь для целей отладки

Ответ №1:

Я скопировал Code.exe файл, из которого была установлена моя программа, и вставил его во временную карту: C:UsersYOUR_USERNAMEAppDataLocalProgramsMicrosoft VS Code Я повторно запускаю обновление, и оно работает.

Ответ №2:

Запустите установочный файл обновления с именем типа «CodeSetup-stable-…exe «, в следующем месте:

C:Users <:Пользователь>AppDataLocalTempvscode-обновление-система-x64

Замените <:User> своим именем пользователя. И убедитесь, что VS Code закрыт.

Та же проблема случилась и со мной. Это было потому, что я установил VS Code в другой каталог, отличный от расположения по умолчанию. Проблема возникла из-за того, что после загрузки обновления во временном каталоге VS Code попытался найти предыдущую установку в расположении по умолчанию, чтобы обновить ее. Поскольку это не удалось, установочный файл обновления остался с временными файлами. Проблема была решена путем ручной установки обновления.

Ответ №3:

Вот как я решил проблему:

  1. Закройте VSCode.
  2. Запустите VSCode ОТ ИМЕНИ АДМИНИСТРАТОРА, щелкнув правой кнопкой мыши на значке VS Code. Этот процесс открывает VSCode.
  3. Теперь запустите то же обновление VSCODE, что и обычно, из VSCode.
  4. VSCode закрывается после завершения процесса обновления и установки последней версии VSCODE.

Ответ №4:

Это происходит потому, что вы установили VSCode в определенный каталог, удалите и загрузите снова, но оставьте каталог по умолчанию. Это связано с тем, что файл обновления ищет каталог по умолчанию

Ответ №5:

Эта проблема возникла у меня, потому что я переместил файлы настройки vscode из раздела в другой, и решение было очень простым. Я открыл файл, который был в пути, который появился в предупреждении, и проблема была решена.

Просто убедитесь, что любой экземпляр vscode был закрыт!

  • Vs code eslint не подсвечивает ошибки
  • Vrv системы ned коды ошибок
  • Vrv система daikin коды ошибок
  • Vrv дайкин коды ошибок
  • Vrv mitsubishi electric код ошибки 4250