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.

 

  • This guide is intended to serve as a collection of links to articles, tools, tips and tricks that explain

  • We found an issue over the holidays related to unattended installations of Visual Studio 2005 on Windows

  • I did try doing a "Dexplore.exe /Q" (as suggested by Dexplore.exe /?) before the main call to the main \Setup\Setup.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.

  • 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.

  • I re-ran the /createunattend deal and even with a specific, silent, installation of the Document Explorer before calling the main setup, it still pauses to complain about the need to install the Document Explorer and to click OK to install it or Cancel to exit. Even if I click OK, Visual Studio 2005 or MSDN don't end up on the computer. These are my command-lines:

    \\server\share\VS2005\msdn\DExplore.exe /q:a /c:"install /q"

    \\server\share\VS2005\vs\Setup\setup.exe /unattendfile \\server\share\VS2005\datafiles\vs.ini

    I'm now at the point of having to log into 16 computers to meet a deadline. I am looking forward to the new Visual Studio and hope to god that the silent installer is much better.

    Thanks for your help anyway.

  • 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.

  • 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.

  • Hi Mcslemon - Unfortunately, the unattended mode for Visual Studio setup only supports a fully silent installation and not an unattended one where a progress bar appears during installation.  If you want to support this, you would need to install each VS component (prerequisites, optional components, MSDN, etc) individually and specify unattended switches for each of them.  I'm sorry for the hassle.

  • Hi Aaron,

    I'm with the IT department at my university, and I've been given the task of creating an unattended installation of Visual Studio 2005 Team Edition for Software Developers.

    I've gotten as far as creating the .ini file for the unattended install using the /createunattend switch. However, the installation quits almost immediately after it begins when I run it using the /unattendfile switch.

    By looking at dd_depcheck80.txt I can tell that the check for the prerequisites is run each time I run setup.exe. I won't paste the entire thing here, but there are many times where this line appears after the name of each prereq:

    Component will not be installed because depcheck can not enumerate features that will be installed.

    As a result, under the Installation Summary heading, depcheck has decided that it's not necessary to install anything. Some are for good reason (a later version already exists), but many (that I know for a fact are not present on my machine) are because they have been marked by depcheck as "not to be installed" for some reason. The log indicates that the session has ended and nothing is on the list of items to be installed.

    Nothing gets logged in dd_vserror80.txt or dd_vsinstall80.txt. But what I find interesting is that a separate log file is generated that I can't find any information on anywhere I've looked. It appears that before setup.exe quits, it creates (in the same directory as the others) AdminBaselineErrorLog.txt which contains only this:

    Setup discovered the following problems:

    1. The file unattend.ini was created for  operating system. Please contact your administrator to obtain the file for your operating system, Win XP.

    2. The file unattend.ini was created for  processor type. Please contact your administrator to obtain the file for your processor type, x86.

    I understand that unattend.ini must be created under the same OS and processor type as it is intended to be installed on. I have done that. In fact, I created the .ini with the same machine that I am attempting to install on. Why it doesn't tell me what OS it thinks I'm on, I don't know.

    Here is where I've been halted in my efforts. If there's any insight you can offer, it would be greatly appreciated.

    Thanks again,

    Carl Hartenstein

  • 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.

  • 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.

  • 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.

  • 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

  • Hi Abhishek_walia - Can you please list the complete command line that you used to create your INI file and to install it?

    Also, do you see any log files created by VS 2005 setup in your %temp% directory in this scenario?  Those logs should give a better idea about why the installation process isn't actually installing anything.

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