IBM Support

How to Create an Offline Visual Studio 2019 Installer and Remove Visual Studio from a System Using the Command Line

How To


Summary

This document provides step by step instructions for creating an offline (air gapped) Visual Studio 2019 installation package and for completely removing Visual Studio 2019 from a system using supported Microsoft command line tools. These procedures are intended for environments without internet access and for enterprise or restricted systems.

Objective

  • Create an offline Visual Studio 2019 installation package using Microsoft‑supported methods
  • Install Visual Studio 2019 on systems without internet access
  • Identify installed Visual Studio instances
  • Uninstall Visual Studio 2019 using the component‑based installer (non‑MSI)

Environment

  • Windows 10 or Windows 11 (fully patched)
  • Visual Studio 2019 (Community, Professional, or Enterprise)
  • Administrative privileges
  • Internet‑connected system for layout creation
  • Offline (air‑gapped) target system for installation

Steps

Using: How to Create Offline Visual Studio Installer

 

A. Download the Visual Studio 2019 Bootstrapper

Download the appropriate Visual Studio 2019 bootstrapper from Microsoft based on the licenses held.

Examples:

  • vs_community.exe
  • vs_professional.exe
  • vs_enterprise.exe

 

B. Create the Offline Layout (Download All Files)

Run these steps once on a system with internet access.

Note: You can create an offline installer for both Visual Studio 2019 and Visual Studio 2022 using Windows 10 or Windows 11 systems and then air‑gap the installation media to systems without internet access.

1. Create a Working Folder

  • Create the folder: C:\Temp
  • Copy the downloaded bootstrapper file into C:\Temp.

 

2. Open an Elevated Command Prompt

  • Right‑click Command Prompt
  • Select Run as administrator

 

3. Change Directory 

  • cd C:\Temp

 

4. Create the Offline Installer Layout

For C++ Desktop Development

vs_enterprise.exe --layout C:\Temp\VS_Enterprise2019 --add Microsoft.VisualStudio.Workload.NativeDesktop --includeRecommended --lang en-US

For .NET Web and Desktop Development

vs_enterprise.exe --layout C:\Temp\VS_Enterprise2019 --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.NetWeb --lang en-US

Note:

  • Change the bootstrapper name (vs_enterprise.exe) to match your licensed edition
  • Change the output folder name as needed
  • The above examples assume an Enterprise license

The system will download and create the offline installation media using the active internet connection.

 

C. Transfer the Offline Installer

  • Once complete, zip the folder:

C:\Temp\VS_Enterprise2019

  • Transfer the ZIP file to the offline system using approved local processes.

 

D. Extract the Offline Installer on the Target System

  • Unzip the contents to a location of your choice.
    Example:

C:\Temp\VS_Enterprise2019

 

E. Install Visual Studio from Offline Media

  • Open an elevated command prompt
  • Change directory to the extracted folder:

cd C:\Temp\VS_Enterprise2019

  • Launch the installer without internet access:

GUI Installation (Offline)

vs_setup.exe --noweb

Fully Silent Installation (Optional)

vs_setup.exe --noweb --quiet --wait --norestart

You can monitor installation progress using Task Manager.
The vs_installer.exe process will disappear when the installation completes.

 

To Remove Visual Studio from the System

 

Important Notes

Visual Studio uses a component‑based installer, not a traditional MSI Product Code.

You cannot uninstall Visual Studio using:

  • Add/Remove Programs (traditional MSI logic)
  • Registry entries under: HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall

 

Process to Remove Visual Studio

 

1. Open an Elevated Command Prompt

 

2. Change Directory to the Visual Studio Installer

cd "C:\Program Files (x86)\Microsoft Visual Studio\Installer"

Note: Quotes are required due to spaces in the directory path.

 

3. Identify Installed Visual Studio Instances

vswhere.exe -all

Sample output:

instanceId: 93f8d1bd

installationName: VisualStudio/16.11.55+37206.5

installationPath: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise

installationVersion: 16.11.37206.5

productId: Microsoft.VisualStudio.Product.Enterprise

displayName: Visual Studio Enterprise 2019

channelId: VisualStudio.16.Release

 

4. Note the Channel ID and Product ID

Common Product IDs by Edition

EditionProduct ID
CommunityMicrosoft.VisualStudio.Product.Community
ProfessionalMicrosoft.VisualStudio.Product.Professional
EnterpriseMicrosoft.VisualStudio.Product.Enterprise

 

5. Uninstall Visual Studio

  • Use the channelId and productId from the vswhere.exe output.
  • Example command:

setup.exe uninstall --channelId VisualStudio.16.Release --productId Microsoft.VisualStudio.Product.Enterprise

 

6. Reboot the System

Restart the system after uninstall completes to finalize component removal.

Document Location

Worldwide

[{"Type":"MASTER","Line of Business":{"code":"LOB66","label":"Technology Lifecycle Services"},"Business Unit":{"code":"BU070","label":"IBM Infrastructure"},"Product":{"code":"SSUCXG","label":"Microsoft Other Applications"},"ARM Category":[{"code":"a8mKe000000004SIAQ","label":"Other Applications"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":""}]

Document Information

Modified date:
30 April 2026

UID

ibm17271275