How to perform an unattended install of Visual Studio 2005 from a DVD-ROM drive
I recently heard from a customer who was trying to deploy Visual Studio 2005 using an unattended INI file and saw setup fail, but only when launching setup directly from the DVD. If they shared the DVD-ROM drive and installed from it using a UNC path or a mapped drive letter, it worked fine.
I took a look at the setup source code and found that due to a really old bug back in the Visual Studio .NET 2002 timeframe, we disabled launching unattended installation directly from removable media. However, there have been some changes in setup since then that make it possible for an unattended installation to succeed in this scenario. Namely, we started shipping Visual Studio on a single DVD instead of multiple CDs, so no disk swaps are necessary.
In order to perform an unattended installation of Visual Studio from a DVD-ROM install location, you will have to take advantage of an undocumented command line switch that exists in setup.exe. Here are the steps that will allow you to do this:
- 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
- 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)
- Launch Visual Studio 2005 in unattended INI creation mode by running <Visual Studio source location>\setup\setup.exe /createunattend <path to INI file to create>
- Step through the Visual Studio 2005 setup UI and create an unattended uninstall INI file
- Launch Visual Studio 2005 setup in unattended uninstall mode by running <Visual Studio source location>\setup\setup.exe /unattendfile <path to INI file created step 2 above> /PromptForCD
The /PromptForCD switch in step 5 will cause setup to skip the check to see if setup is running from a DVD-ROM drive. If you are attempting to perform an unattended install from CD instead of DVD, this switch will also cause a dialog to appear when you need to swap discs, which will make installation not be silent anymore. However, there is no way to perform a fully silent installation from CD anyways because you have to know to swap the discs in the middle of setup. This switch will not have any effect for a DVD install because no disc swaps are required for that scenario.
Comments
- Anonymous
May 09, 2006
Launch Visual Studio 2005 in unattended INI creation mode by running <Visual Studio source location>setupsetup.exe /createunattend <path to INI file to create>
Am stucked on this path.. kindly help me out..
"c:\MicrosoftNETSetup /createunattend c:"
this what i have mentioned in run command. Please correct me if am wrong - Anonymous
May 10, 2006
"c:\MicrosoftNETSetup /createunattend c:test.ini"
setup runs but doest create any ini file under c: - Anonymous
May 10, 2006
The comment has been removed - Anonymous
May 10, 2006
Hi Astebner,
Am able to creae the test.ini as well able to run on network client machine. now the problem is it reboots in between. and if i run the command again same happens again. - Anonymous
May 10, 2006
Can you guide me how to stop the auto reboot it happens 2 to 3 times during installtion. I dont mind once after it completely installs. - Anonymous
May 10, 2006
Astebner Now the only thing is i am able to install on to network client machine. But it reboots in between i want to continue the full installation without reboot in between. it dont mind auto reboot at the end of full setup.
please let me know the solution for it.. thanks in advance. - Anonymous
May 11, 2006
Hi nVidia - I have posted an article at http://blogs.msdn.com/astebner/archive/2006/03/17/554248.aspx that describes how to manage reboots during unattended installs of Visual Studio 2005. Hopefully this will help you here.
Also, I have posted several other items related to unattended installs at http://blogs.msdn.com/astebner/articles/574618.aspx that may be useful to you as well. - Anonymous
May 18, 2006
Hey, have you had it come up asking to insert the DVD?
I'm trying to run it from an unattended xp install I'm making but it's being a little irritating in getting to run properly.
Any help you can give would be much appriciated. - Anonymous
May 18, 2006
Hi Damien - I'm not sure I understand your scenario. Are you trying to preinstall Visual Studio as part of Windows XP setup? Can you list the exact command lines that you are using to try to install it and also how you are launching setup during XP setup? Finally, are you copying the Visual Studio installation files to the local hard drive, installing from the network or installing from a DVD? - Anonymous
May 18, 2006
Hi,sorry I should have described in more detail.
I am using a post windows install program that adds the commands to runoncex when you first login after installing windows.
Since this didn't work the first time I've been fiddling running commands and got as far as installing all the prequisites silently, and then running d:WPIInstallstudiovssetupsetup.exe /unattendfile c:unattended.ini /PromptForCD.
This installs sql server 2005 express, not sure how much further, but then I get a window asking for me to insert the Visual Studio 2005 DVD.
All the files are stored on the dvd (copying across that much data didn't really appeal).
I hope you'll be able to point me in the right direction.
Thanks. - Anonymous
May 22, 2006
The comment has been removed - Anonymous
June 05, 2006
Question:
I am trying to create an integrated installation DVD that includes Visual Studio 2005 as well... - Anonymous
June 13, 2006
PingBack from http://blogs.msdn.com/astebner/articles/574618.aspx - Anonymous
July 18, 2007
The comment has been removed - Anonymous
April 03, 2009
During the rebuild of my development environment I wanted to use the same trick I used before to reduce...