Hey all, I have been meaning to take some time to write down some comments and strategies about unattended installation of the various pieces of Visual Studio .NET. For this article I'm going to focus on a specific request that I've seen very often - how to chain the unattended installation of the Visual Studio prerequisites, the main Visual Studio bits and the MSDN help documentation.
In order to perform any unattended installs there are a couple of key points to remember:
- You have to create an unattended INI file that is fed into setup later on to perform the actual installation
- In order to create an unattended INI file for the Visual Studio setup package, you first have to install the .NET Framework (or the entire set of VS prerequisites) on the machine you create the INI file on - this is because the .NET Framework needs to be present in order to correctly parse and evaluate the vs_setup.msi (because vs_setup.msi contains assemblies and the mechanism Windows Installer uses to manage installation of assemblies is through fusion and fusion is installed by the .NET Framework)
- The unattended INI file is OS-specific. That means if you create the INI file on Windows XP, you need to install Visual Studio on only Windows XP operating systems.
- The unattended INI file is also Visual Studio edition specific. That means that you have to create the INI file using the same exact version of Visual Studio as you want to deploy (for example the English version of Visual Studio .NET 2003 Enterprise Architect)
Here are the steps I used to successfully create INI files and install Visual Studio .NET 2003 Enterprise Architect English on Windows XP Professional:
- Run [Prerequisite Disk Path]\setup.exe /createunattend c:\prereq.ini /vsupdate="[Visual Studio Disk Path]\setup\setup.exe" /vsupdateargs="unattendfile c:\vs.ini"
- Install prerequisites on your test machine
- Run [Visual Studio Disk Path]\setup\setup.exe /createunattend c:\vs.ini /vsupdate="[MSDN Path]\setup.exe" /vsupdateargs="qn"
- Open c:\prereq.ini, go to the [PostSetupLaunchList] section and change """unattendfile c:\vs.ini""" to /unattendfile c:\vs.ini
- Open c:\vs.ini, go to the [PostSetupLaunchList] section and change """qn""" to /qn
- Go to a clean machine without Visual Studio .NET 2003 installed and run [Prerequisite Disk Path]\setup.exe /unattendfile c:\prereq.ini
In the above instructions, the disk paths in square brackets should be substituted with the actual paths of the parts of the product in question. Also, it is required that your computer be able to access the installation paths represented by [Prerequisite Disk Path], [Visual Studio Disk Path] and [MSDN Path] during the installation process. Installing via CD will not work correctly because unattended install does not show disk prompt dialogs, plus that would defeat the purpose of an unattended install anyways. I recommend following the steps in the readme on the root of Visual Studio Disk 1 to stage all of the parts of Visual Studio to a network share. You can find the instructions for doing this for Visual Studio .NET 2003 at http://support.microsoft.com/default.aspx?scid=fh;en-us;vsnet11&x=12&y=15#installingnetwork
As always - please let me know if you have any questions with any of the above or run into trouble getting the steps to work.