Aaron Stebner's WebLog

Thoughts about setup and deployment issues, WiX, XNA, the .NET Framework and Visual Studio

Instructions for chaining installation of Visual Studio 2005 and MSDN

Instructions for chaining installation of Visual Studio 2005 and MSDN

  • Comments 44

I got a question from a customer who found this blog post describing how to chain silent installation of VS .NET 2003 prerequisites, VS .NET 2003 and MSDN.  They wanted to know what the equivalent set of steps would be for chaining silent installation of VS 2005.  There have been some modifications to how setup works behind the scenes in VS 2005, most notably the elimination of the separate step that used to be required to install prerequisite components for VS, so happily I can say these steps are much simpler than in the past.  Here are the steps for VS 2005 (using the same format as my previous post).

To start with you should stage Visual Studio bits to a network share so that you can use this as your installation source later on.  You can accomplish that with the following steps (also described in the VS readme located in the file adminreadme.htm in the Setup subdirectory on VS Disk 1):

  1. Create a folder on your server, such as \\server\vs2005
  2. Create subfolders named \\server\vs2005\vs and \\server\vs2005\msdn
  3. Copy the contents of all CDs labeled Visual Studio 2005 to \\server\vs2005\vs.  If prompted, choose yes to overwrite existing files.
  4. Copy the contents from all the CDs labeled MSDN Library for Visual Studio 2005 to \\server\vs2005\msdn.  If prompted, choose yes to overwrite existing files.
    NOTE: You can substitute a different MSDN Quarterly Library for the version of MSDN that shipped with Visual Studio 2005 if you choose

Now that you have a network image, you can create the unattended INI file to install VS 2005 and MSDN using the following steps:

  1. Locate a test computer that has the same operating system that you want to deploy Visual Studio to in your network, and make sure that it does not already have Visual Studio 2005 installed
  2. Install .NET Framework 2.0 on your test computer (because this is required for creating an unattend file for Visual Studio in the next step)
  3. Run \\server\vs2005\vs\setup\setup.exe /createunattend \\server\vs2005\datafiles\vs.ini /vsupdate=\\server\vs2005\MSDN\setup.exe /vsupdateargs="qn"
  4. Open \\server\vs2005\datafiles\vs.ini, go to the [PostSetupLaunchList] section and change """qn""" to /qn
  5. Go to a clean computer without Visual Studio 2005 installed and run \\server\vs2005\vs\setup\setup.exe /unattendfile \\server\vs2005\datafiles\vs.ini to test the unattended installation process

There are a couple of gotchas that I have seen that you should keep an eye out for when following these instructions:

  • Make sure to note the extra \setup\ directory for the Visual Studio setup.exe in the steps above.  Unattended installation will not work correctly if you run the setup.exe in the root of the \\server\vs2005\vs folder; you must use \\server\vs2005\vs\setup\setup.exe.
  • Make sure that you have write permission for the location that you create your data file at in step 3 (in this example I used \\server\vs2005\datafiles).  You will get an error if you try to create the data files on a share that you do not have write permissions for.
  • Make sure that you create the INI file on a computer that does NOT already have Visual Studio 2005 installed.  If you have VS installed, you will end up creating an INI file for a maintenance mode update instead of an initial install of VS.
  • The INI file for VS is unique to each version of VS (such as Pro, Standard, Team System), and also unique to the OS that you want to install on (Windows 2000, Windows XP, etc).  Make sure that you create INI files on computers that match what you will eventually be deploying to.

There is an advanced trick that you can use when creating this unattend script as well:

  • If you want to perform a full install of MSDN to the local hard drive instead of a default installation, you can read the steps at this blog post to learn how to update your vs.ini file to call MSDN setup with the correct parameters to accomplish this.

In the VS 2003 instructions there was an additional advanced trick regarding waiting for the setup process to exit and checking the return code.  The workaround I listed in my previous post is not necessary in VS 2005 because setup now has specific logic to not copy itself to the %tmep% folder and start a new process if it detects it is being run in administrative installation mode.


  • I'm trying to use /Qb-! for the Visual Studio installation but it doesn't seem to be working.  

    Instead of /vsupdateargs="qn" in step 3 of your instructions I used /vsupdateargs="qb-!".  

    And then edited the vs.ini file as stated in step 4 ("""qb-!""" to /qb-!.  However, it still installs completely silently as if it is using /qn.  Is there anyway to get the progress bar to appear??
  • Hi Pliant - in my experiences with these command line parameters, the arguments that you pass to vsupdateargs end up getting passed directly to the MSDN setup.exe package, but I haven't tried /qb-! before.  Can you please try it with just /qb and see if that works?  There could be some kind of weird escaping logic in the VS setup code that doesn't work well with the - or ! symbols.  Also, you may want to try running MSDN setup.exe directly with these switches to verify that they are accepted by the MSDN setup in the first place before trying to integrate the switches into a chained install with VS.
  • Quick Question:

    When you editing the vs.ini to change """qb-!""" to another vairable are you enclosing the change as """qb-!"""

  • Hi IP - I'm not sure I understand your question.  Do you want to try to change the """qn""" parameter that I describe above to """qb-!"""?  I am not sure that the MSDN setup.exe accepts /qb-! as a command line parameter, so you might want to try running MSDN setup directly with that switch as a proof-of-concept first...
  • Astebner,

    Actually, It was simply asking whether you still need to enclose which ever parameter you use inside the """parameter""" or simply remove the """?

    This is what I have in my ini file.

    Is this correct as it did not seem to work?

    \\servername\vs2005\msdn\setup.exe /qb
  • Hi IP - I just tried a scenario running MSDN setup.exe /qb directly and it does accept that as a command line parameter.  So you should be able to change step 4 in the 2nd set of steps listed above to read as follows:

    4.  Open \\server\vs2005\datafiles\vs.ini, go to the [PostSetupLaunchList] section and change """qb""" to /qb

    When you try that, what do you see happening on your system?  Does MSDN setup launch in full UI mode?  Or does it never launch at all?
  • Hi Aaron and thank you for this nice post !
    I'm just wondering if it is possible to use relative paths instead absolute ones.
    Thanks again.
  • Hi Tiouss - That is a good question.  I don't know of any reason why relative paths would not work, but I also haven't tried it myself.  If you have a chance to try it, please post back the results...
  • Last week, someone asked me about how to perform automated installations of the Visual Studio 2005 Express...
  • Question:
    I tried to install Visual Studio 2005 using the unattended installation instructions that...
  • A few folks (both inside and outside of Microsoft) have contacted me asking for instructions for how...
  • I have previously posted instructions for performing a silent installation for Visual Studio 2005 and...
  • This guide is intended to serve as a collection of links to articles, tools, tips and tricks that explain...
  • I've tried what you suggested -ie, run setup on a clean machine with no software to get an unattend file, and now when I try to run it on some other computers (that have software installed on them), I get the following error message:

    "In order to complete installation of this application, you need to install or upgrade the Microsoft Visual Studio 2005 Document Explorer Click OK to install. Click Cancel to exit Setup."

    Of course, I am normally executing this via Altiris, which aborted with an "Error -1073741819", but if I run the same command-line in "Start, Run" myself, the first error message (above) is what it shows.

    I did a search for the document explorer, thinking that I could install it first, silently, before MSDN, but can't seem to find a setup file for it. How can I silently install this mysterious Document Explorer as well?


  • Hi Mfearby - I haven't seen this behavior in the past.  The unattend INI file should contain instructions to tell VS 2005 to automatically chain in the Document Explorer package as long as that was not installed on the system that you created the INI file on.  Can you please double-check that the INI file is being created on the same OS that you are going to install it on, and also that Document Explorer wasn't already installed on that system prior to credating the INI file?

    If you would like to pre-install Document Explorer yourself, you can find instructions for doing that at http://msdn2.microsoft.com/en-us/vstudio/aa718683.aspx (in section 2.2).

    Hopefully this helps.

Page 2 of 3 (44 items) 123
Leave a Comment
  • Please add 6 and 4 and type the answer here:
  • Post