Win10下VSCode 1.31.1始终以管理员模式启动问题求助
Hey there, based on your situation—running VSCode 1.31.1 on a non-admin Windows 10 account, where it keeps launching with elevated permissions (even though other apps don't, and you've already checked shortcuts, removed extensions, and tried both user/system installs)—here are some targeted troubleshooting steps to get this sorted:
1. Check Registry for Forced Compatibility Settings
Windows' compatibility layer can sometimes silently force apps to run as admin, even if you didn't set it in properties:
- Hit
Win + R, typeregeditto open Registry Editor - Navigate to
HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers - Look for any entry pointing to your VSCode executable (e.g.,
C:\Users\<YourUsername>\AppData\Local\Programs\Microsoft VS Code\Code.exefor user installs, or the system install path) with a value ofRUNASADMIN - If you find it, right-click and delete the entry, then restart VSCode to test
2. Inspect Task Scheduler for Elevated Startup Tasks
If you ever set up an auto-start task for VSCode, it might have the Run with highest privileges option enabled by mistake:
- Open Task Scheduler via
Win + R→taskschd.msc - Browse the "Task Scheduler Library" for any VSCode-related tasks
- Open the task's properties, go to the General tab, uncheck Run with highest privileges, save changes, and reboot to see if it fixes the issue
3. Rule Out Third-Party Tool Interference
Antivirus, system optimization tools, or security suites sometimes flag apps like VSCode as needing elevated access:
- Temporarily disable your antivirus/security tool, then launch VSCode to see if it runs normally
- If it works, head into that tool's settings, find the App Permissions or similar section, and set VSCode to run as a standard user
4. Verify WSL-Related Configurations
Since you're using WSL as your shell, there's a chance a misconfiguration here is triggering elevation:
- Open VSCode settings (
Ctrl + ,), search forterminal.integrated.shell.windows, and confirm it points to the correct WSL path (C:\Windows\System32\wsl.exe) - Try switching back to the default PowerShell/CMD terminal temporarily—if VSCode stops launching as admin, check your WSL shell config files (like
~/.bashrcor~/.zshrc) for commands that might require admin privileges
5. Check VSCode Installation Directory Permissions
For system-wide VSCode installs, the directory might have permissions set that force elevation when the app tries to write to it:
- Locate your VSCode install folder (system installs are usually
C:\Program Files\Microsoft VS Code) - Right-click the folder → Properties → Security tab
- Ensure your user account has at least Read & Execute, List Folder Contents, and Read permissions. If not, click Edit to add these permissions, then restart VSCode
内容的提问来源于stack exchange,提问作者Victor Ionescu

