You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Win10下VSCode 1.31.1始终以管理员模式启动问题求助

Fix: VSCode Always Launches as Administrator on Windows 10

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, type regedit to 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.exe for user installs, or the system install path) with a value of RUNASADMIN
  • 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

Since you're using WSL as your shell, there's a chance a misconfiguration here is triggering elevation:

  • Open VSCode settings (Ctrl + ,), search for terminal.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 ~/.bashrc or ~/.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

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.12 04:09:01