Freigeben über


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>

Comments

  • Anonymous
    March 23, 2006
    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)

  • Anonymous
    April 10, 2006
    I have previously posted instructions for performing a silent installation for Visual Studio 2005 and...

  • Anonymous
    April 11, 2006
    The comment has been removed

  • Anonymous
    September 04, 2006
    If you ever do a Visual Studio .NET 2005 unattended install, you&amp;rsquo;ll notice that the installation...

  • Anonymous
    November 18, 2006
    Recently, a fellow employee contacted me with a question about unattended installation of Visual Studio

  • Anonymous
    July 18, 2007
    The comment has been removed

  • Anonymous
    October 08, 2008
    PingBack from http://aisweb.artinsoft.net/aisblogs/jose_aguilar_blog/archive/2006/09/05/1159.aspx

  • Anonymous
    September 06, 2010
    I tried the steps in the blog but am not able to successgully install vs using the unattend file i can see setup process started in the task manager but after few min the process ends "c:visual studio 2005vssetipsetup.exe" /unattendfile c:vs_2005.ini is the mcd am using ... pls tell e wer am making mistake

  • Anonymous
    September 07, 2010
    Hi Vs unattended installation - Can you please list the exact steps that you've tried and the exact errors that you're currently seeing?  Also, can you please zip and upload your VS setup log files to a file server (such as http://skydrive.live.com) and reply here with a link I can use to download the logs and take a look?  You can find a list of VS 2005 setup log files in the blog post at blogs.msdn.com/.../447012.aspx.

  • Anonymous
    December 02, 2010
    The comment has been removed