Partilhar via


Instructions for chaining installation of Visual Studio 2005 and MSDN

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.

Comments

  • Anonymous
    May 25, 2005
    Visual Studio Team System

    Yesterday marked the one-year anniversary of the public announcement of...

  • Anonymous
    July 07, 2005
    The comment has been removed

  • Anonymous
    July 07, 2005
    The comment has been removed

  • Anonymous
    July 07, 2005
    The comment has been removed

  • Anonymous
    July 07, 2005
    The comment has been removed

  • Anonymous
    July 08, 2005
    The comment has been removed

  • Anonymous
    July 08, 2005
    The comment has been removed

  • Anonymous
    July 08, 2005
    The comment has been removed

  • Anonymous
    July 08, 2005
    The comment has been removed

  • Anonymous
    July 14, 2005
    I got a question from a customer who is trying to use the instructions in this blog post to perform a...

  • Anonymous
    September 19, 2005
    It works great for me.
    As you said, the setup created on Windows 2000 doesn't work on Windows XP, but when I create a setup from XP, it works on Windows 2000 too ! :)

  • Anonymous
    October 24, 2005
    Is there anyway to use QB? I tried doing a QB and it didn't work. I want to give users a progress bar at least.

    Thanks

  • Anonymous
    November 02, 2005
    What if the target computers have VS2003 already installed ? Do I have to make a separate .ini for them ?

  • Anonymous
    January 17, 2006
    Hi Aaron,

    I have a question about the unattended installation of Visual Studio 2005. How will this work if VS 2003 is installed on the pc already? Does this work like an upgrade or does it wipe VS 2003 out completely and install a fresh copy of VS 2005. I am looking to install this to 30 computers and need to know it's behavior before I proceed.

  • Anonymous
    January 17, 2006
    Hi Mike - VS 2005 is designed to work correctly in side-by-side scenarios with VS6, VS .NET 2002 and/or VS .NET 2003 already installed on the system. You will be able to use the unattended installation instructions listed above even if your systems have VS .NET 2003 installed. Please contact me using http://blogs.msdn.com/astebner/contact.aspx if you run into any trouble getting this to work in your scenario.

  • Anonymous
    February 13, 2006
    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??

  • Anonymous
    February 13, 2006
    The comment has been removed

  • Anonymous
    March 06, 2006
    Quick Question:

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

    Regards,

  • Anonymous
    March 06, 2006
    The comment has been removed

  • Anonymous
    March 07, 2006
    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?


    [PostSetupLaunchList]
    \servernamevs2005msdnsetup.exe /qb

  • Anonymous
    March 07, 2006
    The comment has been removed

  • Anonymous
    March 14, 2006
    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.
    Bye.

  • Anonymous
    March 14, 2006
    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...

  • Anonymous
    March 14, 2006
    Last week, someone asked me about how to perform automated installations of the Visual Studio 2005 Express...

  • Anonymous
    March 17, 2006
    Question:
    I tried to install Visual Studio 2005 using the unattended installation instructions that...

  • Anonymous
    March 19, 2006
    A few folks (both inside and outside of Microsoft) have contacted me asking for instructions for how...

  • Anonymous
    April 10, 2006
    I have previously posted instructions for performing a silent installation for Visual Studio 2005 and...

  • Anonymous
    April 11, 2006
    The comment has been removed

  • Anonymous
    July 12, 2007
    The comment has been removed

  • Anonymous
    July 18, 2007
    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.

  • Anonymous
    July 18, 2007
    The comment has been removed

  • Anonymous
    July 18, 2007
    We found an issue over the holidays related to unattended installations of Visual Studio 2005 on Windows

  • Anonymous
    July 18, 2007
    I did try doing a "Dexplore.exe /Q" (as suggested by Dexplore.exe /?) before the main call to the main SetupSetup.exe but it still pauses to complain about the Document Explorer. The machine I used to create the unattend file was a bare install of XPSP2 with the latest updates (at the time I created it) but the machines onto which I am now installing it are based on the bare XPSP2 with latest updates but has quite a bit of educational software on it (no development software, though). It seems to me that this complicated "unattended" setup for VS2005 is just a bit too fragile. It would be nice if Microsoft provided a "/all" switch or something that would just do it's very best to do a complete installation without having to determine what gets installed on one system to then duplicate that particular installation on another system. This is about as evil as trying to rip an old EXE into an MSI -i.e., very dodgy and flakey. I know it's not your fault, and I do appreciate the assistance you have provided on your blog, so please forgive me if it sounds as though I'm venting at you. I just can't believe that silent/unattended installs all have to be so different from each other and so fragile. It doesn't have to be this difficult, IMHO. My next course of action is to download the image from the classroom onto a machine, with all the educational software, and record an unattended installation on the same build. This will probably mean that this particular "unattended" install won't be any good for our other classrooms, but at least it will mean I don't have to visit 16 machines and run the setup myself. Thanks.

  • Anonymous
    July 19, 2007
    Hi Mfearby - If you take a look at http://msdn2.microsoft.com/en-us/vstudio/aa718683.aspx#2.2, it contains the silent install switch for Document Explorer.  It needs to be dexplore.exe /q:a /c:"install /q" and not the one that you tried. I still do not understand why the INI file is not attempting to install Document Explorer, I have never seen a case like that (in fact, I've seen the exact opposite most times - it will attempt to install it even if it is already present). I agree that this INI-based approach is complicated, and fortunately there are some simplifications in the works for VS 2008, but of course those won't help for the scenario you're attempting currently.

  • Anonymous
    July 19, 2007
    The comment has been removed

  • Anonymous
    July 20, 2007
    Hi MFearby - Can you please send me a copy of your INI file and the log files from a failed silent install on your system so I can take a look at it and see if I can figure anything out that way?  The logs created by setup are listed at http://blogs.msdn.com/astebner/articles/447012.aspx. You can send them to Aaron.Stebner (at) microsoft (dot) com.

  • Anonymous
    July 23, 2007
    Hi, Thanks for the excellent guide! Is there a way of having an unattended but visible install? A totally silent one isn't really suitable for our installation methods. I'd like my staff to see what is happening so they know when the process has completed. Cheers. Neil.

  • Anonymous
    July 24, 2007
    The comment has been removed

  • Anonymous
    August 09, 2007
    The comment has been removed

  • Anonymous
    August 12, 2007
    Hi Carlwh - I haven't heard of this type of error unless the INI file was created on a different OS type or processor architecture than the OS that installation is being run on.  Did you make any modifications to the INI file prior to running it in /unattendfile mode?  Could you please send me a copy of your INI file and the adminbaselineerrorlog.txt from your system and let me know the exact OS you created it on and that you're trying to install on?  You can send this information to Aaron.Stebner (at) microsoft (dot) com.

  • Anonymous
    December 26, 2007
    I'm having the same issue as carlwh. I'm also trying to run the installation on the same os that I created the ini file off of. As a note I'm doing this off of an imaged build. Could this have anything to do with it? Also VS2003 using the same methods works without any problems.

  • Anonymous
    December 26, 2007
    Hi DHarric - I ended up working with Carl via email and we figured out that his issue was caused by attempting to run setup in unattended mode and passing a relative path instead of a fully qualified path to the INI file.  I described this scenario in more detail at http://blogs.msdn.com/astebner/archive/2007/10/02/5250961.aspx. Can you please check and see if this is the issue affecting your scenario as well? If this isn't the same problem, can you please email me and send me the log files from your scenario, and also send me the full command lines you are using to create the INI file and run setup in unattended mode?  You can send this information to Aaron.Stebner (at) microsoft (dot) com.

  • Anonymous
    December 25, 2008
    Hi Aaron, I've successfully created the INI file for silently installing Visual Studio Pro 2005 as you've mentioned, but I'm unable to install the application using that ini file. The installation runs for a few seconds but installs nothing. Also, I can see a successfull installation in eventviewer but actually nothing gets installed. Please help. Thanks in advance. Abhishek

  • Anonymous
    January 05, 2009
    The comment has been removed