How to: Create and Run an Unattended Installation of Visual Studio
You can run the installation application for Visual Studio as an unattended (that is, customized silent) installation over an intranet instead of from media such as DVDs. This topic shows how to prepare Visual Studio for this type of installation from a network share.
First, create a network image of the Visual Studio media.
To create a network image
Create a folder on the server (for example, Drive:\IDEinstall\).
Perform one of the following steps:
Download the web bootstrapper, and then run Product.exe /Layout Drive:\IDEinstall\.
Copy the contents of the media for Visual Studio to the IDEinstall folder. After copying the contents, you will still need to download any third-party software that you wish to install.
Share the IDEinstall folder on the network, and set the appropriate security settings.
The network path of the installation application for Visual Studio resembles \\ServerName\IDEinstall\Product.exe.
Installation may fail if any path and file name combination exceeds 260 characters. The maximum length of a path in Visual Studio is 221 characters. The local path name should not exceed 70 characters, and the network path name should not exceed 39 characters.
Installation may also fail if the folder names in the path include embedded spaces (for example, "\\ServerName\IDE install" or \\ServerName\Visual Studio\).
To deploy Visual Studio in unattended mode, you must modify the AdminDeployment.xml file. To do this, you must first create the AdminDeployment.xml file by using the /CreateAdminFile <file location> command-line parameter. Then, you can use this file to either push a deployment of Visual Studio to your network or pull it into an installation if you put that file in the Drive:\IDEinstall\packages directory. The AdminDeployment.xml file is not unique to an operating system, architecture, edition of Visual Studio, or operating-system language.
Sometimes, items listed as selected in the AdminDeployment.xml file do not get installed. To resolve this issue, place the items marked “Selected="yes"” at the end of the AdminDeployment.xml file.
If you don’t want to install the optional dependencies of an item, then you must select the parent first and then deselect the optional dependencies after the parent, as shown in the following screenshot:
Another way to do this is to simply omit the optional children of a parent—in other words, do not include any “Selected=”no”” items—but you still must place all the “Selected=”yes”” items at the end of the AdminDeployment.xml file.
During installation, the computer may automatically restart one or more times. After it restarts, you must log back in with the same user account with which you were logged on to perform the installation before the computer restarted. You can avoid automatic restarts by installing the prerequisite components before you run an unattended installation. For more information, see the section entitled "Avoid Restart During Setup" in the Visual Studio Administrator Guide.
The AdminDeployment file schema contains the following elements:
Behaves the same as overriding the path in the user interface of the installation application. This element is ignored if Visual Studio is already installed.
If the value of this element is yes, the installation application never attempts to go to the web during the setup action.
If the value of this element is Yes, hides a Selectable item in the customization tree.
Selects or clears a selectable item in the customization tree.
Location of the feed that the user wants to use. This feed is used for subsequent modify operations on the machine (“Default” by default).
Will prevent the user from being prompted to refresh setup if there is a newer one available.
Won’t refresh Setup if there is a newer one available.
Prevents pre-population of the package cache.
The installation application will respect the Selected state of a SelectableItem even if it is hidden. For example, if you want to always install a selectable item, you can mark it as hidden and selected.
To create an unattended installation of Visual Studio
In Drive:\IDEinstall\AdminDeployment.xml file, change the value of the NoWeb attribute of the BundleCustomizations element from "default" to "yes" as the following example shows:
Change <BundleCustomizations TargetDir="default" NoWeb="default"/> to <BundleCustomizations TargetDir="default" NoWeb="yes"/>
Change the SelectableItemCustomization attribute as needed for optional components, and then save the file.
You can run unattended setup either by automatically running the installation application for Visual Studio on client computers or by allowing users to run the application themselves using settings that you define.
To run an unattended installation on a client computer
Open the Start menu, choose Run, and then enter \\ServerName\IDEinstall\vs_Product.exe /adminfile PathOfTheAdmindeployment.xmlFile AdditionalParametersAsNeeded
For example, you can specify the following command line: \\server1\IDEinstall\vs_ultimate.exe /adminfile \\server1\ IDEinstall\AdminDeployment.xml /quiet /norestart
To enable clients to manually install Visual Studio with pre-defined settings
Copy the customized AdminDeployment.xml file to a network share that is read-only (for example, \\ServerName\IDEinstall\packages\AdminDeployment.xml).
Enable users to install from that share.
If you open Control Panel and rerun the installation application, you can modify features of Visual Studio, uninstall programming languages, and repair or uninstall Visual Studio.
You must have administrative credentials on the local computer to use maintenance mode.
To maintain an installation on a client computer
Open Control Panel, and then choose Programs and Features.
Choose Visual Studio, and then choose Change.
To change AdminDeployment settings on a client computer after Visual Studio has been installed
Update AdminDeployment.xml as needed.
Open the Start menu, and then choose Run.
Enter the following text:
\\ServerName\IDEinstall\vs_Product.exe /AdminFile PathToAdmindeployment.xmlFile AdditionalParametersAsNeeded
For example, you can specify the following command line: \\server1\IDEinstall\vs_ultimate.exe /adminfile \\server1\IDEinstall\AdminDeployment.xml /quiet /norestart
Repair is the default parameter after Visual Studio is installed. If you repair Visual Studio with an updated /AdminFile, you will override the current Admin Deployment Settings with those that the updated AdminDeployment.xml invokes.
After installation is complete, you can register your copy of Visual Studio from within Visual Studio.
Open the Help menu, and then choose Register Product.
Enter product key.