How to: Create and Run an Unattended Visual Studio Setup
You can run the Visual Studio Setup program from a customized silent installation instead of DVDs. This is known as an unattended installation. This topic shows how to prepare Visual Studio for installation from a network share.
Creating a Network Image
First, create a network image of the Visual Studio media.
To create a network image
Create a folder on the server, for example, <drive>:\VS2010\.
Copy the contents of Visual Studio DVD to the VS2010 folder.
If you do not use Retail distribution media, go to step 5.
Create a pre-populated product key for the user.
In the VS2010 folder, open the Setup subfolder.
Open setup.sdb by using a text editor such as Notepad, and locate the line that contains [Product Key].
Add the 25-character product key, which is located on the DVD packaging, immediately following [Product Key]. Do not include dashes in the key.
Save the changes and close the file.
Share the VS2010 folder on the network and set the appropriate security settings.
The path of the Visual Studio Setup from the network resembles \\<servername>\VS2010\setup.exe.
Note
Setup 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.
Setup may also fail if the folder names in the path include embedded spaces. For example, "\\<servername>\VS 2010" or "\\<servername>\Visual Studio\".
Creating unattend.ini Files
To deploy Visual Studio in unattended mode, you must create an associated .ini file. You must create a unique .ini file for each target operating system. For example, an .ini file created for Windows XP cannot be used for Windows Vista.
Note
During installation the computer may automatically restart 1 or more times. After restart you must log back in with the same administrative user account that was logged on prior to the restart. Automatic restarts can be avoided by pre-installing the prerequisite components prior to running a unattended installation..
To create a Visual Studio unattend .ini file
Insert the Visual Studio 2010 DVD and ignore the autorun message.
Click Start, click Run, and then type drive**:\setup\Setup.exe /createunattend** path of the .ini file you want to create.
For example: D:\setup\setup.exe /createunattend c:\VS2010_deployment.ini
Follow the directions on the Start page of Setup, and then click Next.
On the Options page, select Customize, and then click Next.
On the Customize page, select the features that you want to deploy, and then click Save Settings.
To create a Visual Studio 2010 Documentation unattend file (optional)
Click Start, click Run.
Type the following (or save and run in a .bat file):
<Help Library Manager source drive and location>HelpLibraryManager.exe /silent /content /<parameters(see below)>
For example, if content is on the Visual Studio installation DVD and the DVD was in drive d then this would be the command: "C:\Program Files\Microsoft Help Viewer\v1.0\HelpLibManager.exe" /silent /product VS /version 100 /locale en-US /content C:\ProgramData\Microsoft\HelpLibrary /sourceMedia D:\ProductDocumentation\HelpContentSetup.msha
The following parameters are used to define the content installed on the client computer:
Parameter |
Description |
---|---|
/product |
The product code. For example, vs. |
/version |
The product version being installed. For example, 100. |
/locale |
The product locale being installed. For example, en-us. |
/silent |
Perform the installation without prompting the customer or displaying any UI. |
/content |
Required if the /silent argument is present. Specifies the location for the local content store if one has not been previously set. It is ignored if the content store location is already defined. |
/brandingPackage |
The file name of the branding package for the catalog. Ignored if the catalog already exists. |
/sourceMedia |
The location to check for installation files for help content. If this location is not found, or does not contain the files needed by Help Viewer, the /sourceWeb argument is used. |
/sourceWeb |
The HTTP ServiceApi endpoint where a customer can select books. |
/mediaBookList |
Specified for silent installs. If this argument is not provided, all books in the sourceMedia file are installed. The names of the books are the book1.html, book2.html file names. |
/webBookList |
Specified for silent installs. If this argument is not provided, all books found at the sourceWeb endpoint that match the locale of the catalog are installed (relative paths - base URI is the sourceMedia argument). |
/NoOnline |
Used by ISO Shell content provider to indicate that find content online and check for updates online functionality should not be enabled for their catalogs (used in the shortcut that launches HLM - is ignored as part of setup). |
Running Unattended Setup
Verify that Visual Studio is available on the network.
To run unattended Visual Studio Setup on a client computer
Click Start, click Run, and then type \\<servername>\VS2010\Setup\setup.exe /unattendfile <path of the Visual Studio .ini file>
For example: \\server\VS2010\Setup\setup.exe /unattendfile \\server\VS2010\VS2010_deployment.ini
To run unattended Visual Studio 2010 Documentation setup on a client computer (optional)
Click Start, click Run.
Type the following or save and run from a .bat file:
<Library Manager source drive>:HelpLibManager.exe /silent /content /<parameters – see above>
For example:
"C:\Program Files\Microsoft Help Viewer\v1.0\HelpLibManager.exe" /silent /product VS /version 100 /locale en-US /content C:\ProgramData\Microsoft\HelpLibrary /sourceMedia \\myServer\ProductDocumentation\HelpContentSetup.msha
Note
For more information about Microsoft Visual Studio 2010 Documentation setup options, please refer to the Help System readme. The readme (\\Program Files\Microsoft Help Viewer\v1.0) is installed as part of the Microsoft Visual Studio 2010 installation.
Installation Maintenance
An existing Visual Studio installation can be maintained by using the Control Panel to rerun Setup.
Note
Users must have administrative credentials on the local computer to use maintenance mode.
To perform installation maintenance on a client computer
Open Control Panel and then click Add or Remove Programs (Windows XP) or Programs and Features (Windows Vista).
Select Visual Studio and then click Change/Remove (Windows XP) or Uninstall/Change (Windows 7 or Windows Vista).