This post will guide you step-by-step through the installation of Visual Studio code via MS Intune.
Prepare VS code exe file for MS Intune
- Download the VS Code from this link
- Download from GitHub the “IntuneWinAppUtil” from this link
INFO: For demo purposes I have downloaded the VS code app into the IntuneWinAppUtil folder. |
Package the executable file into a .intunewin format.
- Line 1. Run the IntuneWinAppUtil.exe
- Line 2. Specify the source folder (The folder path that contains the VS code executable, i.e. D:\VSCode-Intune\Microsoft-Win32-Content-Prep-Tool-master)
- Line 3. Specify the setup file (Type the executable file name, i.e.VSCodeUserSetup-x64-1.77.1.exe)
- Line 4. Specify the output folder (The folder path to output the generated .intunewin file, i.e. D:\VSCode-Intune\Microsoft-Win32-Content-Prep-Tool-master\export)
The image below depicts how the IntuneWinAppUtil.exe will process the executable packaging into an .intunewin file.
A few seconds later the VSCodeUserSetup-x64-1.77.1.intunewin file is ready to deploy within MS Intune.
Deploy VS Code via MS Intune
To create a Win32 app policy for the VS Code app using Microsoft Intune, you can follow these steps:
Step 1. Sign in to the Microsoft Endpoint Manager admin center at https://endpoint.microsoft.com.
Step 2. Navigate to “Apps” > “All apps” and click on “Add“.
Step 3. Select “Windows app (Win32)” as the app type
Step 4. On the “App information” page, enter the following information:
- Select file to update: Upload the VS Code app package file. *
- Name: Enter a name for the app.
- Description: Enter a description for the app.
- Publisher: Enter the publisher of the app.
- App Version: Enter the version of the app.
- Logo: Upload the app logo
* You can upload the .intunewin file as shown in the following image.
Step 5. On the “Program” page, specify the Install and uninstall commands, like the table below shows:
Install Command | VSCodeUserSetup-x64-1.77.1.exe /verysilent /norestart /mergetasks=!runcode /log=”%temp%\VSCodeInstall.log |
Uninstall Command | %UserProfile%\AppData\Local\Programs\Microsoft VS Code\unins000.exe” /verysilent /norestart |
Step 6. On the “Requirements” page, specify the OS architecture and the minimum OS the app will be installed on.
Step 7. On the “Detection rules” page, specify the detection rules for the app. By doing this, your app will only install on devices that meet the criteria you specify.
Rules format: Manually configure detection rules
Detection Rules
- Rule type: File
- Path: %UserProfile%\AppData\Local\Programs\Microsoft VS Code
- File or folder: Code.exe
- Detection method: File or folder exists
Step 8. On the “Assignments” page, specify the groups of users or devices the app should be assigned to.
Step 9. On the final “Review + create” page, review and save the app policy.