Why is "Check for Update" missing and updating if VS Code is started in Admin mode?
Asked Answered
A

1

5

I have to start VS Code in Administrator mode on Windows (UAC).

As soon as I do that, the Help menu does not display "Check for Updates" anymore. VS Code is not updating anymore.

Settings > Update:Mode has no influence on the behaviour.

I have to remove the "start as admin" flag from the properties of the file, close all instances, and start it again. Then it immediately shows "Check for Updates" in the Help menu and also recognizes that updates available.

Before 1.52 this also worked with Admin mode without any problems.

Tried every setting I could find.


Since I updated manually to the new version this happens if I start VS Code as an Administrator:

Warning if starting VS Code as admin

This is the Help: About output:

Version: 1.82.1 (user setup)
Commit: 6509174151d557a81c9d0b5f8a5a1e9274db5585
Date: 2023-09-08T08:45:05.575Z
Electron: 25.8.0
ElectronBuildId: 23503258
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Windows_NT x64 10.0.22631
Antaeus answered 13/9, 2023 at 22:28 Comment(0)
P
6

This is by design and is because you installed Visual Studio Code per user rather than per system:

VS Code provides both Windows user and system level setups.

The user setup does not require Administrator privileges to run as the location will be under your user Local AppData (LOCALAPPDATA) folder. Since it requires no elevation, the user setup is able to provide a smoother background update experience. This is the preferred way to install VS Code on Windows.

Note: When running VS Code as Administrator in a user setup installation, updates will be disabled.

Contrary to popular belief, Windows programs installed per user don't actually need administrator rights to run or update or install, because users have read/write permissions to their own drives/folders by default. Only programs installed for all users require a user to have local administrator permissions (to install in Program Files, for example).

So to resolve your problem, stop running this user-specific installation of VS Code as an administrator, or uninstall it and use the system installer of VS Code to install it for all users, instead.

For user-specific installations, you don't need to run 'check for updates' manually, because VS Code will check and install them automatically in the background, as the quote above indicates.

Pralltriller answered 15/9, 2023 at 13:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.