Freigeben über


How to fix Visual Studio 2005 unattended installs on Windows Vista

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>

Comments

  • Anonymous
    March 17, 2006
    Question:
    I tried to install Visual Studio 2005 using the unattended installation instructions that...

  • 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
    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
    March 07, 2010
    Visual studio 2008 = gfn_mid net framework  

  • Anonymous
    February 10, 2011
    Hi Aaron..Its really useful information on Unattend file. I have one more query here with respect to the silent Installation of the Visual Studio 2005 on Windows 7 (32Bit) using Unattend file.The installation goes very fine in silent mode but at one point It stops with the Popup "this program has a known compatibilty issues with this version of Windows" when I click Run Program ignoring the message the rest of the installation again will continue in silent mode.I just want to know how to suppress this message during silent installation.I want that the end user should not get this popup during the silent installation.

  • Anonymous
    February 10, 2011
    Hi Zaheer - You will need to use a technique like the one described in the blog post at blogs.msdn.com/.../how-to-automatically-suppress-application-compatibility-warnings-on-windows-vista.aspx to suppress this type of compatibility warning dialog during Visual Studio 2005 setup on Windows Vista and Windows 7.

  • Anonymous
    June 20, 2011
    Hi Aaron, Firstly, thanks for your great posts - we wouldn't have made it this far if it wasn't for your excellent website! However, we're still stuck... Or at least the setup.exe for VS2005 is... We've followed the instructions on your website and others, and VS2005 seems to install correclty using an unattend ini on both Windows 7 x86 and x64, however the setup.exe continues to run in the backgroup, and our deployment system (Altiris) therefore presumes the job hasn't finished. Perhaps it hasn't? I can find anything particular in the logs, so was wondering if we could send you the logs and our set-up routines? Many thanks, RL

  • Anonymous
    June 21, 2011
    The comment has been removed

  • Anonymous
    June 22, 2011
    The comment has been removed

  • Anonymous
    June 22, 2011
    The comment has been removed

  • Anonymous
    July 05, 2011
    Hi RL - I'm sorry for the delay getting back to you.  I've been out on vacation for a little while and haven't had time to look at this scenario until now.  The log file link you sent me is telling me that I don't have permissions to your SkyDrive share, so if you have a chance to take a look at that and fix it, I'd appreciate it.  I'd like to be able to look at the logs to see what setup is doing at the time that it stays running on your computer. It isn't necessary to create a transform and create an INI file.  Those are designed to be mutually exclusive deployment options.  Can you try eliminating the steps that create and use vs2005.mst and see if that makes any difference? Also, slipstreaming VS service packs isn't officially supported, so you may or may not run into issues if you try to do that.  Does your slipstreamed layout install correctly if you run in full UI mode instead of in unattended mode?  If you have time, could you try the same unattended scenario without any slipstreamed VS service packs and see if you get any better results?

  • Anonymous
    August 16, 2011
    Hi Aaron, Just wondering if you got the logs I put on Skydrive? Thanks, RL

  • Anonymous
    August 19, 2011
    Hi RL - I found the SkyDrive sharing notification email in one of my sub-folders - it got processed by a rule that I wasn't aware of.  When I tried to access the folder with your logs, it told me that it was only shared out to friends, so I sent you a friend request.  Let me know if the friend request shows up on your side.  Sorry for the hassles here.

  • Anonymous
    August 31, 2011
    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

  • Anonymous
    August 31, 2011
    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.

  • Anonymous
    September 02, 2011
    Hi Aaron, Can we give Skydrive one last go. I can now see you listed as a friend... Thanks

  • Anonymous
    September 02, 2011
    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?

  • Anonymous
    September 04, 2011
    Hi Aaron, Thanks for all of this - I've resent the link. Kind regards, RL

  • Anonymous
    September 07, 2011
    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.

  • Anonymous
    September 12, 2011
    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

  • Anonymous
    September 12, 2011
    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?

  • Anonymous
    September 13, 2011
    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

  • Anonymous
    September 15, 2011
    Hi Aaron, I've uploaded 'dd_vsinstall80.txt' to skydrive. Thanks, RL

  • Anonymous
    September 25, 2011
    Hi Aaron, Private link, just in case: skydrive.live.com/redir.aspx Thanks, RL

  • Anonymous
    September 26, 2011
    The comment has been removed

  • Anonymous
    July 05, 2012
    The comment has been removed

  • Anonymous
    July 09, 2012
    The comment has been removed