Aaron Stebner's WebLog

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

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

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

Rate This
  • Comments 10

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>

 

  • 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)
  • I have previously posted instructions for performing a silent installation for Visual Studio 2005 and...
  • This guide is intended to serve as a collection of links to articles, tools, tips and tricks that explain...
  • If you ever do a Visual Studio .NET 2005 unattended install, you&amp;rsquo;ll notice that the installation...
  • Recently, a fellow employee contacted me with a question about unattended installation of Visual Studio

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

  • PingBack from http://aisweb.artinsoft.net/aisblogs/jose_aguilar_blog/archive/2006/09/05/1159.aspx

  • 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 2005\vs\setip\setup.exe" /unattendfile c:\vs_2005.ini

    is the mcd am using ... pls tell e wer am making mistake

  • 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.

  • <VS install source>\setup\setup.exe /unattendfile vs_2005.ini

    This can be a problem if you are deploying this via SCCM unless you specify the UNC path for the location where the ini file is stored or else SCCM isn't smart enough to assume that the ini file is located in the same directory as the setup.exe

    Therefore the command line should be like <VS install source>\setup\setup.exe /unattendfile  \\path to ini\vs_2005.ini which can represent an issue down the road for deployment

Page 1 of 1 (10 items)
Leave a Comment
  • Please add 3 and 6 and type the answer here:
  • Post