Chaining unattended installation of Visual Studio .NET 2003, its prerequisites and MSDN

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:

  1. Run [Prerequisite Disk Path]\setup.exe /createunattend c:\prereq.ini /vsupdate=”[Visual Studio Disk Path]\setup\setup.exe” /vsupdateargs=”unattendfile c:\vs.ini”
  2. Install prerequisites on your test machine
  3. Run [Visual Studio Disk Path]\setup\setup.exe /createunattend c:\vs.ini /vsupdate=”[MSDN Path]\setup.exe” /vsupdateargs=”qn”
  4. Open c:\prereq.ini, go to the [PostSetupLaunchList] section and change “””unattendfile c:\vs.ini””” to /unattendfile c:\vs.ini
  5. Open c:\vs.ini, go to the [PostSetupLaunchList] section and change “””qn””” to /qn
  6. 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;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.


Comments (13)

  1. after i create my ini files were should I place them? Dothey go in the folders in which I have the set up files?

  2. It should not matter where you put the INI files after you create them. You will just need to make sure that the path you provide in steps 1, 4 and 6 after the word "unattendfile" are consistent with the location that you put the INI files after they are created.

  3. Ever since I posted my original instructions for chaining unattended installation of the Visual Studio…

  4. DGhost says:

    Sweet, that’s exactly the info I was looking for… I’ve got a lot of Visual Studio installation going on and I was wondering why I couldn’t run the .msi for the setup, now that explain everything.

    Thx for the info Aaron!

  5. Bumblebee says:

    I followed all the steps, but still get the same error as:

    Error 1308. Source file not found: c:visual studio net 2003vsprod1Program FilesMicrosoft Visual Studio .NET 2003SDKv1.1Docscpqstart.HxS. Verify thta the file exists and that you can access it.

    Please help.

    Many thanks!!

  6. astebner says:

    Hi Bumblebee – That file is on CD2 of VS 2003.  Can you see that file in the location listed in the error dialog?  Are you sure you followed the steps to stage all of the disks of VS setup into a single network share?  Those steps are described at;en-us;vsnet11&x=12&y=15#installingnetwork.

  7. Freekeko says:

    thanks Aaron Stebner alot for this toturial

    but i wanna ask about 2 things

    – when the installation begins the system restart automatic , how can i avoid this ?

    – Is there anyway to make indicator, popup message to tell me when the installation finished

    thanks again

  8. astebner says:

    Hi Freekeko – This blog post is talking about VS .NET 2003 – is that the version you want to install or will you be installing a newer version of Visual Studio?

    If you are going to install VS 2008, it has a new switch called /norestart that will allow you to suppress reboots.  If you are going to install VS 2002, 2003 or 2005, there is not a way to automatically suppress reboots.  Instead, you will need to pre-install any prerequisites that might require reboots before you install VS so that you can manage those reboots separately.  In addition, in VS 2005, there is a bug in the unattended INI creation that causes it to try to re-install prerequisites even if you already pre-installed them.  You’ll need to use steps like the ones at to workaround that bug.

    There is not a built-in way to cause a pop-up to appear after the installation is complete.  To accomplish that, you will need to use some kind of a wrapper process to call VS setup, wait for it to finish, and then display a message box from there.

    Hopefully this helps.

  9. suenihy says:

    在进行修复VS2008之前,我只用到C#,但是因为项目的需要我需要用到c ,准备修复一下VS2008.但是却出现了“Aproblemhasbeenencounteredwhileload…