How to work around Visual Studio 2005 and 2008 unattended install bug related to Windows Installer 3.1
While helping an internal Microsoft team work on deployment scripts to install Visual Studio 2008 to the systems in their test lab, we found a bug in the VS 2005 and VS 2008 unattended setup logic that I wanted to describe here and provide a workaround for.
Description of the issue
If you are creating and using an unattended INI file to deploy VS 2005 or VS 2008, and the target system is Windows XP or Windows Server 2003 and has a version of Windows Installer that is newer than version 3.1.4000.2435, then setup will incorrectly attempt to install Windows Installer 3.1 even though a later version is already on the system, and then eventually setup will fail silently.
For reference, VS 2005 and VS 2008 setup look at the file version of the file %windir%\system32\msi.dll to determine what version of Windows Installer is present on the system.
How to work around the issue
If you are running into this scenario while deploying VS 2005 and/or VS 2008, you can use the following steps to work around this issue:
- Launch Visual Studio 2005 or 2008 setup by running <VS install location>\setup\setup.exe /createunattend vs_unattend.ini
- Select the components that you want to install in the VS 2005 or 2008 setup feature tree and save the INI file
- Open the INI file in a text editor such as Notepad
- Locate the [PreInstallOrder] section and remove the line gfn_mid windows installer 3.1
- Locate the [InstallOrder] section and remove the line gfn_mid windows installer 3.1
- Locate the [PostInstallOrder] section and remove the line gfn_mid windows installer 3.1
- Locate the [gfn_mid windows installer 3.1] section and change the line that says InstallActionInteger=5 to say InstallActionInteger=1
- Save and close the INI file
- Run <VS install location>\setup\setup.exe /unattendfile vs_unattend.ini
One additional note - if you are using the new silent install switches (/q and /full) to deploy VS 2008 instead of creating an INI file, then you will not see this behavior, even if you have a version of Windows Installer that is newer than 3.1.4000.2435 installed on your system.
<update date="2/4/2008"> This issue affects both VS 2005 and VS 2008, so I updated the text to indicate that it can happen for either product family. </update>