Intune App Packaging

How to Deploy Visual Studio Code via Intune (Win32 Packaging Guide)

Published 17 March 2026 · 7 min read

Visual Studio Code has a dedicated system installer (separate from the per-user installer) that is the right choice for Intune deployment. The key thing to get right is using the system installer EXE rather than the standard one - the standard installer puts VS Code in the user's AppData folder, which makes Intune detection unreliable.

Contents
  1. Download the system installer
  2. Wrap with the Content Prep Tool
  3. Add the app in Intune
  4. Install and uninstall commands
  5. Detection rule
  6. Deploying extensions
  7. Known gotchas

Download the system installer

VS Code provides a system installer specifically for managed deployments. Download it from:

https://code.visualstudio.com/download

Under Windows, look for the System Installer option (not the User Installer). Download the 64-bit version. The filename will be VSCodeSetup-x64-1.x.x.exe.

⚠️
System installer vs user installer
The default download button on the VS Code site gives you the User Installer, which installs to AppData. Always use the System Installer for Intune. It installs to Program Files and is manageable at machine level.

Wrap with the Content Prep Tool

IntuneWinAppUtil.exe -c "C:\AppSource\VSCode" -s "VSCodeSetup-x64-1.96.0.exe" -o "C:\IntunePackages"

Add the app in Intune

Intune Admin Centre → Apps → Windows → + Add → Windows app (Win32)
  1. Upload the .intunewin file
  2. Name: Visual Studio Code
  3. Publisher: Microsoft Corporation

Install and uninstall commands

VS Code uses an Inno Setup installer with the following silent switches:

⚙️
Program settings
[]
Install commandMERGETASKS controls what is configured - this adds right-click menu and PATH, suppresses auto-launch
VSCodeSetup-x64-1.96.0.exe /VERYSILENT /NORESTART /MERGETASKS=!runcode,addcontextmenufiles,addcontextmenufolders,associatewithfiles,addtopath
Uninstall command
C:\Program Files\Microsoft VS Code\unins000.exe /VERYSILENT /NORESTART
Install behaviour
System
Device restart behaviour
No specific action
💡
MERGETASKS explained
!runcode prevents VS Code launching immediately after install. addtopath adds the code command to the system PATH. Remove any tasks you do not need.

Detection rule

🔍
File detection rule
[]
Rule type
File
Path
C:\Program Files\Microsoft VS Code
File or folder name
Code.exe
Detection method
File or folder exists
💡
Test your detection rule first
Before deploying to users, install the app manually on a test device and verify the detection rule matches. Run the detection script or check the file path exists before assigning to a group.

Deploying extensions

You can pre-install VS Code extensions as part of the Win32 deployment using a PowerShell wrapper script instead of deploying the EXE directly. The script installs VS Code then runs the extension installer:

# install.ps1
$installer = "$PSScriptRoot\VSCodeSetup-x64-1.96.0.exe"
Start-Process $installer -ArgumentList "/VERYSILENT /NORESTART /MERGETASKS=!runcode,addtopath" -Wait

# Install extensions for all users
$codeExe = "C:\Program Files\Microsoft VS Code\bin\code.cmd"
$extensions = @(
    "ms-vscode.powershell",
    "ms-vscode-remote.remote-ssh"
)
foreach ($ext in $extensions) {
    Start-Process $codeExe -ArgumentList "--install-extension $ext --force" -Wait
}

Known gotchas

VS Code auto-updating

VS Code updates itself automatically. If you want to manage updates via Intune supersedence instead, add the following registry key post-install to disable auto-update:

REG ADD "HKLM\SOFTWARE\Policies\Microsoft\VSCode" /v "UpdateMode" /t REG_SZ /d "none" /f
Installer typeEXE (Inno Setup) - use System Installer
Silent installYes - /VERYSILENT /NORESTART
Install pathC:\Program Files\Microsoft VS Code
Auto-updatesEnabled by default - disable via registry if needed
Reboot requiredNo

Frequently Asked Questions

Q: How do I deploy VS Code silently via Intune?

Use the System Installer with: VSCodeSetup-x64.exe /VERYSILENT /NORESTART /MERGETASKS=!runcode,addcontextmenufiles,addcontextmenufolders,associatewithfiles,addtopath. This installs system-wide and adds VS Code to the PATH.

Q: What is the VS Code System Installer and why does it matter for Intune?

The System Installer installs VS Code to Program Files for all users. The standard User Installer installs to AppData per-user, which makes Intune detection unreliable and prevents system-level management.

Q: How do I deploy VS Code extensions via Intune?

Use a PowerShell wrapper script that calls code.cmd --install-extension [extension-id] after installing VS Code. Deploy the script and installer together in the same Intune Win32 package.

Q: How do I disable VS Code auto-updates in Intune?

Add a registry key post-install: HKLM\SOFTWARE\Policies\Microsoft\VSCode with UpdateMode set to "none". This disables the built-in update check so you can manage versions via Intune supersedence.

// need intune set up properly?
Fixed-price Intune setup for UK businesses

I set up Intune for UK small businesses at a fixed price - app deployment, compliance policies, Conditional Access, and full documentation handed over at the end.

View Packages
More App Packaging Guides
Deploy Notepad++ via Intune Deploy Firefox via Intune Deploy Malwarebytes via Intune
#intune #app-packaging #win32