Deploy Visual Studio Code via ConfigMgr

G’Day, quick post on how to deploy Visual Studio Code via ConfigMgr today!

Download

For my environment, I’ll be using the x64 installer to deploy via ConfigMgr. x64/x86/ARM installers can be found at https://code.visualstudio.com/download, make sure to select the System Installer to be able to ensure that the application is available for all users on endpoints:

Downloading the Visual Studio Code for deployment via ConfigMgr

Create the ConfigMgr Application

Once you have downloaded your content, copy this to the location of your sources folder that we’ll reference later on, now let’s create the ConfigMgr application for deployment, within the ConfigMgr console, create an application, a new wizard will appear, select Manually specify the application information:

Fill out some General Information on the application for easy administrative identification, like so:

On the Software Center tab, I like to upload a logo and a description for end-users so they can easily identify the application if this application was made available to them :

TIP: You can select the installer itself via the browse button to extract the icon.

On the Deployment Types section, click Add, then in the new wizard under type selection, select Script Installer:

Enter in some General Information to easily identify the Deployment Type:

On the Content page, browse to a network location for which the installer has been saved and enter the following install and uninstall commands:

Install:

VSCodeSetup-x64-1.59.0.exe /VERYSILENT /CLOSEAPPLICATIONS /SUPPRESSMSGBOX /NORESTART /mergetasks=!runcode

Uninstall:

"C:\Program Files\Microsoft VS Code\unins000.exe" /VERYSILENT /NORESTART

Like so:

TIP: Make sure the installer is within its own folder for the content location, otherwise ConfigMgr will download more content than it needs during the application deployment.

On the Detection Method section, add a clause and add in the following registry information:

Key:

SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{EA457B21-F73E-494C-ACAB-524FDE069978}_is1

Also, ensure that the Hive is set to HKEY_LOCAL_MACHINE, the DisplayVersion is set as the value and then data type of Version, then finally enter in the version that you’re installing, in this case, it’s 1.59.0, like so:

Note: The detection method will be different if you’re installing the X86 version or utilising the user installer. Also beware that newer versions of the application may change the product code found in the registry, if this is the case, update it or consider using a file version based detection method instead.

On the User Experience section, enter the following settings:

On the Requirements tab, seeing as I’m deploying the X64 version of the installer, I’m going to set a Device requirement of only Windows 10 x64 versions:

Note: If you have additional x64 operating systems that you wish to target, make sure these are included in the above requirement list.

That’s pretty much it, there are no dependencies and confirm your settings and complete the Deployment Type wizard and then finally the new application wizard whilst confirming settings all the way through.

Final steps to complete:

  • Distribute the new application content
  • Deploy the application to at least one device as available (This is you can confirm the installation and uninstallation process and ensure all is well).

Trust but Verify

After deploying the Visual Studio Code to a test device, open Software Center and test the installation and uninstallation process:

You can also check the ConfigMgr console for results, under Monitoring and then Deployments:

Troubleshooting

  • Make sure the above steps are accurate.
  • Make sure detection method is still valid based on what version being deployed.
  • Review the client side logs of C:\Windows\CCM\Logs\AppEnforce.log to obtain status and errors.

Until next time!

Leave a Reply...