Welcome to MSDN Blogs Sign in | Join | Help

Mailbag: How can I suppress reboots during Visual Studio 2005 unattended installation?

Question:

I tried to install Visual Studio 2005 using the unattended installation instructions that you previously posted, and in some cases I see that the computer reboots without any notification to the user, and I have to either log the computer back on or configure automatic logon to allow unattended setup to finish installing VS 2005.  When I searched through the log files I found that one of the prerequisite components required a reboot.

How can I configure unattended installation so that it will suppress reboots until the end so I can avoid this scenario?

Answer:

Visual Studio 2005 unattended installation suppresses all UI, and it does not have built-in support for suppressing reboots until the end.  In previous versions of Visual Studio (VS .NET 2002 and 2003), the recommended solution for this scenario was to create a script that pre-installs each of the prerequisite components and then installs VS using the /unattendfile switch and an unattended INI file.  Doing this allows you to manage any possible reboots during prerequisite setup package installation on a more granular level. 

However, VS 2005 setup shipped with a bug in the unattended INI file creation process that causes prerequisite components to be included for installation in the INI file even if they have already been installed on the system.  I previously talked about a workaround for this type of issue on Windows Vista in this blog post.  A couple of recent emails from customers alerted me to the fact that this issue happens on all operating systems and not just on Windows Vista.

In order to create a script that that will allow you to suppress reboots during unattended installation of VS 2005, you will need to do the following:

1.  Create and modify an unattended INI file to work around the bug described above:

  • Launch Visual Studio 2005 setup on a machine that does not already have VS 2005 installed by running <VS install location>\setup\setup.exe /createunattend vs_2005.ini
  • Select the components you want to install in the VS setup selection tree and save the INI file
  • Open the INI file in a text editor such as Notepad
  • Locate the [PreInstallOrder] section and remove the lines gfn_mid windows installer 3.1, gfn_mid framework, gfn_mid framework ia64, gfn_mid framework amd64 and gfn_mid dexplore
  • Locate the [InstallOrder] section and remove the lines gfn_mid windows installer 3.1, gfn_mid framework, gfn_mid framework ia64, gfn_mid framework amd64 and gfn_mid dexplore
  • Locate the [PostInstallOrder] section and remove the lines gfn_mid windows installer 3.1, gfn_mid framework, gfn_mid framework ia64, gfn_mid framework amd64 and gfn_mid dexplore
  • Locate the [gfn_mid windows installer 3.1] section and change the line that says InstallActionInteger=5 to say InstallActionInteger=1
  • Locate the [gfn_mid framework] section and change the line that says InstallActionInteger=5 to say InstallActionInteger=1
  • Locate the [gfn_mid framework ia64] section and change the line that says InstallActionInteger=5 to say InstallActionInteger=1
  • Locate the [gfn_mid framework amd64] section and change the line that says InstallActionInteger=5 to say InstallActionInteger=1
  • Locate the [gfn_mid dexplore] section and change the line that says InstallActionInteger=5 to say InstallActionInteger=1
  • Save and close the INI file

2.  Create a script to install the prerequisites and then run VS 2005 in unattended mode:

  • (on a system that does not already have Windows Installer 3.1) Run <VS install source>\wcu\msi31\WindowsInstaller-KB893803-v2-x86.exe /quiet /norestart
  • (on an x86 system that does not already have the .NET Framework 2.0 installed) Run <VS install source>\wcu\dotNetFramework\dotnetfx.exe /q:a /c:"install.exe /q"
  • (on an x64 system that does not already have the .NET Framework 2.0 installed) Run <VS install source>\wcu\dotNetFramework\x64\netfx64.exe /q:a /c:"install.exe /q"
  • (on an ia64 system that does not already have the .NET Framework 2.0 installed) Run <VS install source>\wcu\dotNetFramework\ia64\netfx64.exe /q:a /c:"install.exe /q"
  • (on a system that does not already have Document Explorer 2005 installed) Run <VS install source>\wcu\DExplore\DExplore.exe /q:a /c:"install.exe /q"
  • Run <VS install source>\setup\setup.exe /unattendfile vs_2005.ini

Knowledge base article KB913445 also describes this scenario and provides a slightly different workaround.  That knowledge base article only describes how to fix x86 installation scenarios, so I would suggest following the steps in this blog post instead of the ones in the knowledge base article.

<update date="3/26/2006"> Added a link to a knowledge base article which was recently published about this scenario </update>

 

Published Friday, March 17, 2006 7:33 PM by astebner

Comments

Thursday, March 23, 2006 4:44 PM by Ben

# re: Mailbag: How can I suppress reboots during Visual Studio 2005 unattended installation?

Thank you very much. That saved my day! :)
(Before you do the same with Visual SourceSafe - don't. Just run the .msi, provided you install VSS /after/ VStudio)
Tuesday, April 11, 2006 12:26 AM by Aaron Stebner's WebLog

# How to perform a silent install of Visual Studio 2005 Team Explorer

I have previously posted instructions for performing a silent installation for Visual Studio 2005 and...
Tuesday, April 11, 2006 11:08 PM by Aaron Stebner's WebLog

# Visual Studio 2005 and .NET Framework 2.0 deployment guide

This guide is intended to serve as a collection of links to articles, tools, tips and tricks that explain...
Monday, September 04, 2006 9:50 PM by Jose Aguilar's Blog

# Visual Studio unattended install

If you ever do a Visual Studio .NET 2005 unattended install, you&amp;rsquo;ll notice that the installation...
Saturday, November 18, 2006 4:07 PM by Aaron Stebner's WebLog

# How to automatically suppress application compatibility warnings on Windows Vista

Recently, a fellow employee contacted me with a question about unattended installation of Visual Studio

Wednesday, July 18, 2007 3:33 PM by Aaron Stebner's WebLog

# Visual Studio 2005 and .NET Framework 2.0 deployment guide

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

Wednesday, October 08, 2008 2:55 PM by Visual Studio unattended install | Jose Aguilar's Blog

# Visual Studio unattended install | Jose Aguilar's Blog

Anonymous comments are disabled
 
Page view tracker