User setup for Windows
Announced last release, the user setup package for Windows is now available on stable. Installing the user setup does not require Administrator privileges as the location will be under your user Local AppData (LOCALAPPDATA) folder. User setup also provides a smoother background update experience.
Download User Setup
If you are a current user of the system-wide Windows setup, you will be prompted to install user setup, which we recommend using from now on. Don't worry, all your settings and extensions will be kept during the transition. During installation, you will also be prompted to uninstall the system-wide setup.
Reference: https://code.visualstudio.com/updates/v1_26#_user-setup-for-windows
Answer from Surenthar Pitchai on Stack OverflowI've completely uninstalled vs code several times and every time I try to run the user setup I get this
I'm an administrator user, but I am not right clicking - run as administrator or anything. I can't imagine that vs code wants to force its users to create guest accounts to run code so it can't be that my current user is an administrator. What is with this error?
User setup for Windows
Announced last release, the user setup package for Windows is now available on stable. Installing the user setup does not require Administrator privileges as the location will be under your user Local AppData (LOCALAPPDATA) folder. User setup also provides a smoother background update experience.
Download User Setup
If you are a current user of the system-wide Windows setup, you will be prompted to install user setup, which we recommend using from now on. Don't worry, all your settings and extensions will be kept during the transition. During installation, you will also be prompted to uninstall the system-wide setup.
Reference: https://code.visualstudio.com/updates/v1_26#_user-setup-for-windows
I installed the user version side-by-side with the system version with no problems. The basic differences between the two is that the system version installs on the file system like every other app. The user install is basically a click-once (or web installer) version that installs in the User folder of the machine.
The settings made to VS Code in the system version save for Everybody on the computer and the user version the settings are only for the user. I find that the behavior of the user version is a bit annoying for me because I have reasons to want to open multiple copies of VS Code at the same time and the user version only allows one instance. Otherwise, there's not really anything different between the two as far as I can tell.
I installed Visuaal studio code. Ran it once as administer. Now it wont run without Elevated privaleges How do I stop this as I dont think it is required.
vscode is running with [administrator] at top
Should I use the User or System Installer?
VS Code Installer Will Not Run as Administrator (System-Wide Install\All User Install) on Windows 11 24H2
If you log in as an admin user and try to install the user version of vs code you get the warning. If you go ahead and install then your vs code won't be able to get update notifications or be able to auto update. If this is a problem for you the solution is to not run the install directly but to run it as follows:
runas /machine:x86 /trustlevel:0x20000 vscodeinstaller.exe
The above will run the always x86 installer exe and install your selected version as a regular user. trustlevel x20000.
Answer found at this link: How to install application as regular user if your are logged in as Administrative User
Not as simple as I had hoped. After install that avoids the warning you are still running code as admin because you are in the admin group. So... still no auto update and you still get that annoying warning.
Make a shortcut with:
C:\Windows\System32\runas.exe /machine:amd64 /trustlevel:0x20000 "C:\Users\brook\AppData\Local\Programs\Microsoft VS Code\code.exe"
Put it on your desktop and run it.
Windows will push all your "open with code" double click on files into the running version.
Stealing from this answer, I see that visualstudio.com says:
If you are a current user of the system-wide Windows setup, you will be prompted to install user setup, which we recommend using from now on.
That suggests to me that the error message we've both seen will soon be obsolete.
That is, when the installer sees you logged in as admin (which conventionally means you wouldn't be coding), it assumes you wanted this now-intended-to-be-deprecated use case where you're installing once on the system for ALL users, which the user setup won't do.
You've probably seen installers ask this: "Do you want to install for all users or just your user?" If all users, it asks you to give the installer admin permissions and installs in Program Files. If just you, it installs in a user path (like VS Code for users does: C:\Users\thySmyUserName\AppData\Local\Programs\Microsoft VS Code).
Instead of a unified system/user install, VS Code seems to have broken it into two.
Make sense? If you're installing to code when logged in as admin, like on a remote box or something, that might still be a bit of an admin smell, but the user setup sh/w/ould otherwise be fine.
If you wanted to install for every user on the box, which you could do with your fancy admin permissions, you'd need to get a different installer. That's all.
That's not the fix. "Run as Administrator" was never ticked in the first place. The problem is the installer itself. It keeps running as Admin even though we never did Run as Admin. When double-clicking the installer it keeps saying "This User installer is not meant to be run as an Administrator. If you would like to install for all users in this system, download the system installer instead from https://code.visualstudio.com" even though we never run as admin.
Hi Bill,
Open this folder:
"C:\Users%username%\AppData\Local\Programs\Microsoft VS Code"
Right-click "Code.exe" and click Properties.
Select the "Compatibility" tab.
Uncheck "Run this program as an administrator" if it's enabled.
(I see you checked the shortcut properties. But the above is a separate setting.)
If that doesn't help, let me know if this problem is seen for other apps (e.g... Office apps).
Launch msinfo32.exe, press Ctrl + S to save the entries to an NFO file.
Please upload the NFO log and share it on OneDrive.
Hi Bill,
Open this folder:
"C:\Users%username%\AppData\Local\Programs\Microsoft VS Code"
Right-click "Code.exe" and click Properties.
Select the "Compatibility" tab.
Uncheck "Run this program as an administrator" if it's enabled.
(I see you checked the shortcut properties. But the above is a separate setting.)
If that doesn't help, let me know if this problem is seen for other apps (e.g... Office apps).
Launch msinfo32.exe, press Ctrl + S to save the entries to an NFO file.
Please upload the NFO log and share it on OneDrive.
Hi, I am Dave, I will help you with this.
The Visual Code installer is available as a User Installer and a System Wide installer, the User version is now the preferred version, that installs a version of Visual Code that does not require Administrator privileges and the user data for Visual Code will be stored in your AppData folder.
Thanks
