Aaron Stebner's WebLog

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

How to fix Visual Studio 2005 unattended installs on Windows Vista

How to fix Visual Studio 2005 unattended installs on Windows Vista

Rate This
  • Comments 29

We found an issue over the holidays related to unattended installations of Visual Studio 2005 on Windows Vista.  This issue was reported by a Microsoft employee trying to create a script to deploy Visual Studio 2005 in a lab of computers running Windows Vista.  What he found is that creating the unattended INI file on Windows Vista incorrectly detects that it needs to install the .NET Framework 2.0, and then the installation fails because the .NET Framework 2.0 is already installed as part of the OS on Vista.

In order to workaround the issue we found, you will need to use the following steps to deploy Visual Studio 2005 using unattended mode on Windows Vista:

  1. Launch Visual Studio 2005 setup on a Windows Vista machine that does not already have VS 2005 installed by running <VS install location>\setup\setup.exe /createunattend vs_2005_vista.ini
  2. Select the components you want to install in the VS setup selection tree and save the INI file
  3. Open the INI file in a text editor such as Notepad
  4. Locate the [PreInstallOrder] section and remove the lines gfn_mid framework, gfn_mid framework ia64 and gfn_mid framework amd64
  5. Locate the [InstallOrder] section and remove the lines gfn_mid framework, gfn_mid framework ia64 and gfn_mid framework amd64
  6. Locate the [PostInstallOrder] section and remove the lines gfn_mid framework, gfn_mid framework ia64 and gfn_mid framework amd64
  7. Locate the [gfn_mid framework] section and change the line that says InstallActionInteger=5 to say InstallActionInteger=1
  8. Locate the [gfn_mid framework ia64] section and change the line that says InstallActionInteger=5 to say InstallActionInteger=1
  9. Locate the [gfn_mid framework amd64] section and change the line that says InstallActionInteger=5 to say InstallActionInteger=1
  10. Save and close the INI file
  11. Run <VS install location>\setup\setup.exe /unattendfile vs_2005_vista.ini

Important notes about the above steps:

  • Please note the folder location in the command line to run both /createunattend and /unattendfile mode.  Those parameters only work for the copy of setup.exe in the setup subfolder.  They do not work for the copy of setup.exe in the root of the installation disc.
  • You must create the INI file on the same OS that you plan to install it on.  For example, you cannot create an INI file on Windows XP and then install using that INI file on Windows Vista.
  • You can use the steps listed in this blog post to stage Visual Studio 2005 on a network and chain MSDN setup after VS setup if desired.

These steps have been documented in the online version of the Visual Studio 2005 administrator mode readme.  Note that this item was added after VS 2005 shipped, so if you look at the copy of the administrator mode readme located at \setup\adminreadme.htm on your VS 2005 installation disc, you will not see this additional note about Windows Vista.

The underlying bug in Visual Studio unattended mode is that it tries to re-install a component even if it is already on the system.  Since the .NET Framework 2.0 is already present as an OS component on Windows Vista, this will cause Visual Studio unattended setup to fail.  This issue can also affect Windows XP and other non-Vista operating systems if the .NET Framework 2.0 SP1 or .NET Framework 2.0 SP2 are already installed on the computer.  If you are running Visual Studio setup in unattended mode on Windows XP or Windows Server 2003 and that system already has the .NET Framework 2.0 SP1 or 2.0 SP2 installed, then you will need to use the workaround listed in this blog post there as well.

<update date="11/25/2009"> Added a note about how this scenario can affect other operating systems besides Windows Vista. </update>

 

  • Hi Aaron,

    No invitation has arrived yet. So I invited you. Should arrive from Rufus ...

    Failing this I'll set-up an FTP

    Thanks

    RL

  • Hi RL - I'm sorry, but I haven't seen any invitations.  If you can make the folder with your log files public or setup an FTP, I'd appreciate it.

  • Hi Aaron,

    Can we give Skydrive one last go. I can now see you listed as a friend...

    Thanks

  • Hi RL - I don't have a link to your SkyDrive site anymore.  Can you please post a link so I can try again to download your log files?

  • Hi Aaron,

    Thanks for all of this - I've resent the link.

    Kind regards,

    RL

  • Hi RL - I've downloaded your logs, but I haven't had time to look at them yet.  I hope to have some time to look at them later this week, and I'll reply here when I do.

  • Thanks Aaron,

    Fingers crossed - We've virtualised over 50 apps using App-V and created silent installers for the rest. This is the only app outstanding. Unfortunately our developers still use 2005 becauwse of client requirements.

    Anyhow, I'll leave in your capables.

    Thanks again,

    RL

  • Hi RL - The logs in your vslogs.cab do appear to show a successful installation.  There is one particular log I was looking for that I didn't see in the cab though - dd_vsinstall80.txt.  That log is the one created by the VS setup engine, and I was hoping it would show more information about what it was doing so that I could try to narrow down why the setup process is not exiting in your scenario.  Can you check and see if you have that log file on one of your repro machines?

  • Hi Aaron,

    I'll run another pass of it today and specifically look for that look and upload it if I find it.

    Thanks,

    RL

  • Hi Aaron,

    I've uploaded 'dd_vsinstall80.txt' to skydrive.

    Thanks,

    RL

  • Hi Aaron,

    Private link, just in case: skydrive.live.com/redir.aspx

    Thanks,

    RL

  • Hi RL - Unfortunately, I don't see anything in this log that helps me narrow down the issue any further.  From what I can see, it is correctly skipping the .NET Framework and Windows Installer components, and it appears to have installed all components correctly (prerequisites, the main VS MSI, and post-requisites) prior to hanging.

    Would it be possible for you to try a simpler install scenario to see if that helps narrow down the issue any further?  For example, can you try creating the INI, removing the .NET Framework and Windows Installer components, and installing with this INI without doing any of the slip-streaming to see if that makes a difference?

    If that doesn't help either, you might need to chain the install of each of the components of VS setup and bypass the VS setup chainer entirely to avoid this issue.

  • Hi Aaron,

    I have found the same bug exists with unattended installations of Visual Studio 2008 Pro on Windows 7.

    * QUOTE: The underlying bug in Visual Studio unattended mode is that it tries to re-install a component even if it is already on the system. END QUOTE. *

    We had to remove the following from the .ini files, as Windows 7 already comes with the version of .net framework (as per your other post: blogs.msdn.com/.../mailbag-what-version-of-the-net-framework-is-included-in-what-version-of-the-os.aspx):

    ‘gfn_mid net framework v3.5’ or ‘gfn_mid net framework v3.5 x64’

    I have another similar problem with an unattended installation of VS 2008...

    During the creation of the .ini file using the /createunattend switch we unselected the installation of SQL Express, however when we install VS2008 on a machine that has SQL full edition installed, the VS2008 unattended install fails with an error saying that there is a new version of SQL Server Compact 3.5 components already installed on the machine.

    Why is the VS2008 unattened install trying to even install the SQL Server Compact 3.5 components when SQL Express was clearly unselected during the /createunattend phase?

    Besides that question, do you know what line/s I need to remove in the .ini files to force the unattened installation to not attempt to install the SQL Server Compact 3.5 components?

    Thanks,

    John

  • Hi RLJF - Correct, this same bug exists for both VS 2005 and VS 2008 setup, and you will need to disable the installation of the .NET Framework 3.5 on Windows 7 because the .NET Framework 3.5 SP1 ships with Windows 7 already, and trying to install the standalone version of the .NET Framework 3.5 will fail on Windows 7 as a result.

    SQL Express is a separate product from SQL Server Compact - the former is for PC database development and the latter is for compact device database development.  The checkbox in VS 2008 setup only causes SQL Express to be skipped.  The SQL Server Compact components are hidden and automatically selected for you when installing or creating an unattend file.

    I'm not sure how the new versions of the SQL Server Compact components got installed on your Windows 7 computer in the first place.  If you need to suppress installation of SQL Server Compact in your unattend file, you should be able to do so by removing the following entries from the unattend file:

    GFN_MID SQLEDesktopSDK

    GFN_MID SQLEToolsForVS2007

    GFN_MID SQLEDeviceSDK

Page 2 of 2 (29 items) 12
Leave a Comment
  • Please add 2 and 8 and type the answer here:
  • Post