Aaron Stebner's WebLog

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

Better detailed instructions for chaining Visual Studio, Prerequisites and MSDN

Better detailed instructions for chaining Visual Studio, Prerequisites and MSDN

  • Comments 25

Ever since I posted my original instructions for chaining unattended installation of the Visual Studio .NET Prerequisites, Visual Studio and MSDN, I have had a few customers who tried these steps out and had problems getting the steps to work.  So as a result I want to write a new post where I give better detail and clarify each of the steps to make this unattended installation process easier to understand and implement.

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):

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

Now that you have a network image, you can create the unattended INI files to install VS Prerequisites, VS 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 .NET 2003 installed
  2. Run \\server\vs2003\prereqs\setup.exe /createunattend \\server\vs2003\datafiles\prereq.ini /vsupdate="\\server\vs2003\vs\setup\setup.exe" /vsupdateargs="unattendfile \\server\vs2003\datafiles\vs.ini"
  3. Install .NET Framework 1.1 on your test computer (because this is required for creating an unattend file for Visual Studio in the next step)
  4. Run \\server\vs2003\vs\setup\setup.exe /createunattend \\server\vs2003\datafiles\vs.ini /vsupdate=\\server\vs2003\MSDN\setup.exe /vsupdateargs="qn"
  5. Open \\server\vs2003\datafiles\prereq.ini, go to the [PostSetupLaunchList] section and change """unattendfile \\server\vs2003\datafiles\vs.ini""" to /unattendfile \\server\vs2003\datafiles\vs.ini
  6. Open \\server\vs2003\datafiles\vs.ini, go to the [PostSetupLaunchList] section and change """qn""" to /qn
  7. Go to a clean computer without Visual Studio .NET 2003 installed and run \\server\vs2003\prereqs\setup.exe /unattendfile \\server\vs2003\datafiles\prereq.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:

  1. 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\vs2003\vs folder; you must use \\server\vs2003\vs\setup\setup.exe.
  2. Make sure that you have write permission for the location that you create your data files at in steps 2 and 4 above (in this example I used \\server\vs2003\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.
  3. Make sure that you create the INI files on a computer that does NOT already have Visual Studio .NET 2003 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.
  4. The INI files for VS are unique to each version of VS (such as Pro, Standard, Enterprise Architect), 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 are a couple of advanced tricks that you can use when creating these unattend scripts as well:

  1. 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.
  2. If you want to run the unattended installation via a batch file or script and wait for the process to exit and check the return code, you will notice that by default Visual Studio setup copies itself to the %temp% folder, kills the current process and restarts to perform the actual installation.  This logic breaks batch files or scripts that listen for return codes.  To prevent setup from copying itself to the %temp% folder and starting a new process, you can open up setup.sdb in the \\server\vs2003\vs\setup folder, locate the [Product Information] section, and add the following line to that section:  NoInitialFileCopy=1.  You must add this entry to setup.sdb before you create any of the INI files above.

As always, let me know if you have questions or problems with any of the above steps....


  • If we dont have .NET Pre-requisite CD, how can we manage to instal .NET.

    Where can I find all the software pre-requistes over the NET.

    Can you please send the URL of all the pre-requisites..required for WINDOWS XP ..O.S.
  • If we dont have .NET Pre-requisite CD, how can we manage to install .NET.

    Where can I find all the software pre-requistes over the NET.

    Can you please send the URL of all the pre-requisites..required for WINDOWS XP ..O.S.
  • Hi!

    We have XP Sp2 with .NET 2 Beta 2 deployed to all machines and want to deploy VS.NET 2005 Beta 2 untattended to several machines.

    Where can I find the steps to do that? It would be cool if you could write an article how to silently install VS.NET 2005!

  • Hi,

    I have followed these instructions to the T about 100 times already and for some reason it will not create the vi.ini file. It creates the prereq.ini file but no the other. I read the Gothcas and made sure everything is being typed in correctly and I have full writes on the server. PLEASE HELP! What could I be doing wrong. One thing I have to mention is that the path to my server is quite long. I cut names of directories down such as datafiles is d and vs2003 is vs. Could this be the problem? Any input would be greatly appreciated.

    Marcos Santiago
  • I got a question from a customer who found this blog post describing how to chain silent installation...
  • Marcos - I sent you an email requesting some additional info to try to track down why the INI file is not being created in your scenario. I would like to take a look at the exact command line you used to try to create the INI, the exact depth of the path that you are trying to run VS setup from, and the VS setup UI log file at %temp%\vsinstall71.txt (if it exists).

    Rinku - there are a couple of prereq packages that are not available via for download via the web. You will need the following, but that will not fully allow you to install VS 2003 without having a prerequisite CD:

    Internet Explorer 6.0 SP1 (note that this is included in Windows XP SP2, so if you have that installed you can skip this one) - http://www.microsoft.com/downloads/details.aspx?FamilyID=1e1550cb-5e5d-48f5-b02b-20b602228de6&DisplayLang=en

    .NET Framework 1.1 - http://www.microsoft.com/downloads/details.aspx?FamilyId=262D25E3-F589-4842-8157-034D1E7CF3A3&displaylang=en

    J# Redistributable Package 1.1 -
  • Any Suggestions on making SP1 for .NET (VS7.0) install silently. The vendor whos code we are extending will be switching from VS6.0 to VS7.0 late this year, I've tried to get .NET2003 to work - but they have lots of stuff hard coded to the VS7.0 directories. -- Anyway I can install VS 7.0 silent, but am having problems with the service pack - any help would be appreciated


  • Hi Les - you can download VS .NET 2002 (VS 7.0) SP1 from http://www.microsoft.com/downloads/thankyou.aspx?familyId=c41d8159-b42f-4d06-a797-e510494976ee&displayLang=en and then run the package with the /q switch to install it silently. Let me know if you run into any problems getting this to work...

  • Works perfect! Only two questions.... is it possible to have a progress bar during install and remove the reboot in the prerequisites setup?
  • Hi Olan - unfortunately the answer to both of your questions is no. There is not a way to make unattended VS installation show a small progress bar (similar to msiexec's /qb switch). Also, any reboots required during installation need to happen, and are caused by files in use during installation. There has been some work done in the .NET Framework 2.0 to reduce reboots (http://blogs.msdn.com/quanto/archive/2005/08/28/457389.aspx) that will help here. You can also try to close down unnecessary processes on your client machines prior to installing VS to help reduce reboots.

  • Question: Will it work on a local drive? Say I put everything in "c:\vs2003" ?
  • Hi Glentium - these instructions should also work if you copy the files to a local drive (such as c:\vs2003) instead of a network path. I used network paths in the example because the most common scenario I've run into is that people want to create a central network install point and then run that same setup on all of their client machines.
  • Thanks Aaron. Just finished copying the CDs.. I'll try it then post the result here..
  • I'm installing it on a Windows Server 2003 which comes with .NET Framework 1.1 installed. I already applied SP1 and ASP.NET hotfix in it. Problem is when I run Step 4 to create the VS.INI files, it says my some of the components installed does not match the versions required by VS.NET 2003. Is it because of the preinstalled .NET Framework 1.1? Do I need to install the .NET Framework 1.1 Redistributable Package? It says it doesn't support Windows Server 2003? Is it okay to install it even though I already have the preinstalled .NET Framework?
Page 1 of 2 (25 items) 12
Leave a Comment
  • Please add 7 and 5 and type the answer here:
  • Post