Installing Visual Studio Code on Windows
Visual Studio Code is available for Windows through a user installer, a system installer, and a ZIP archive. The User setup is the recommended installation for most people because it does not require administrator permissions and supports smoother background updates.
Install VS Code on Windows
Choose User setup or System setup
VS Code provides both Windows user-level and system-level setups.
| Setup type | Use when | Notes |
|---|---|---|
| User setup | Install VS Code for your Windows account. | This setup does not require administrator permissions. It installs under %LOCALAPPDATA%\Programs\Microsoft VS Code and provides the smoothest update experience. Updates are disabled when VS Code runs as Administrator from a User setup installation. |
| System setup | Install VS Code for all users on the machine. | This setup requires administrator permissions and installs under Program Files. In-product updates also require elevation. |
See the Download Visual Studio Code page for the full list of installation options.
Install with the Windows installer
-
Download the Visual Studio Code User setup for Windows.
-
Run the installer,
VSCodeUserSetup-{version}.exe.By default, the User setup installs VS Code under
C:\Users\{Username}\AppData\Local\Programs\Microsoft VS Code.
Setup adds Visual Studio Code to your %PATH% environment variable. Restart your console after installation, then run code . in a folder to open that folder in VS Code.
Install with the System setup
-
Download the Visual Studio Code System setup for Windows.
-
Run the installer with administrator permissions.
The System setup makes VS Code available to all users on the machine.
Install from a ZIP archive
-
Download the Visual Studio Code ZIP archive for Windows.
-
Extract the ZIP archive and run VS Code from the extracted folder.
When VS Code is installed from a ZIP archive, update it manually for each release.
Updates
VS Code ships weekly releases and supports auto-update when a new release is available. When VS Code prompts you for an update, accept the prompt to install the new version.
Disable auto-update if you prefer to update VS Code on your own schedule.
Develop on Windows
Windows works well as a cross-platform development environment. This section covers the Windows Subsystem for Linux (WSL) and Windows Terminal.
Keep Windows up to date. Check Settings > Windows Update for available updates.
Windows Subsystem for Linux
With WSL, install and run Linux distributions on Windows to develop and test source code on Linux while working locally on your Windows machine.
When paired with the WSL extension, VS Code provides editing and debugging support while running in the context of WSL.
See the Developing in WSL documentation to learn more, or try the Working in WSL introductory tutorial.
Windows Terminal
Windows Terminal, available from the Microsoft Store, is a terminal application for command-line tools and shells like Command Prompt, PowerShell, and WSL. Its main features include multiple tabs, panes, Unicode and UTF-8 character support, a GPU-accelerated text rendering engine, custom themes, styles, and configurations.
After installation
After you install VS Code, finish setup for your development workflow:
- Install additional components, including Git, Node.js, TypeScript, language runtimes, and command-line tools.
- Install extensions from the Visual Studio Marketplace to add themes, formatters, debuggers, and language support.
- Set up GitHub Copilot to use AI features in VS Code.
- Start the VS Code tutorial for a hands-on tour of the user interface and key features.
Common questions
What command-line arguments are supported by Windows Setup?
VS Code uses Inno Setup to create its Windows setup package. All Inno Setup command-line switches are available.
To prevent Setup from launching VS Code after completion, use /mergetasks=!runcode.
I'm having trouble with the installer
Use the ZIP archive instead of the installer. To use this installation method, unzip VS Code in your AppData\Local\Programs folder.
Unable to run as admin when AppLocker is enabled
With the introduction of process sandboxing, running as administrator is currently unsupported when AppLocker is configured due to a runtime sandbox limitation. Read the VS Code sandbox blog post for more information.
If your work requires VS Code to run from an elevated terminal:
-
In VS Code, run the Preferences: Configure Runtime Arguments command in the Command Palette (⇧⌘P (Windows, Linux Ctrl+Shift+P)).
This command opens an
argv.jsonfile to configure runtime arguments for VS Code. The file might already contain default arguments. -
Add
"disable-chromium-sandbox": trueto theargv.jsonfile. -
Restart VS Code. VS Code can then run from an elevated terminal.
Subscribe to issue #122951 to receive updates.
Working with UNC paths
As of version 1.78.1, VS Code on Windows only opens UNC paths that are either approved by the user on startup or whose host name is configured through the
security.allowedUNCHosts
setting. UNC paths begin with a leading \\.
If your workflow relies on UNC paths in VS Code, use one of these options:
- Configure the host with the
security.allowedUNCHosts
setting. For example, add
server-awhen opening a path such as\\server-a\path. - Map the UNC path as a network drive, and use the drive letter instead of the UNC path.
- Define a global environment variable named
NODE_UNC_HOST_ALLOWLISTwith a backslash-separated list of permitted host names. For example,server-a\server-bpermits the hostsserver-aandserver-b.
If a remote extension connects to a remote workspace, such as with SSH, configure security.allowedUNCHosts on the remote machine, not on the local machine.
This change improves security when using VS Code with UNC paths. See the associated security advisory for more information.