Thoughts about setup and deployment issues, WiX, XNA, the .NET Framework and Visual Studio
All postings are provided AS IS
with no warranties, and confer no rights. Additionally, views expressed
herein are my own and not those of my employer, Microsoft.
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:
Important notes about the above steps:
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>
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
Visual studio 2008 = gfn_mid net framework
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.
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.
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?
Hi VS 2005 setup.exe doesn't finish on unattended install on Windows 7 - There are a couple of issues that I know of that could cause problems here. The .NET Framework 2.0 SP2, 3.0 SP2 and 3.5 SP1 are installed as a part of the OS on Windows 7, so you need to make sure to update your unattended INI file to exclude the step to install the .NET Framework 2.0. There is also a problem with the Windows Installer 3.1 component that is described at blogs.msdn.com/.../5846181.aspx, so you will need to update your unattended INI file to exclude that component as well - there are steps explaining how to do that in that other blog post.
Hopefully, the installation will complete as expected once you make both of those changes to the INI file. If not, please use the tool described at blogs.msdn.com/.../6458047.aspx to collect all of your Visual Studio setup log files, upload the file named %temp%\vslogs.cab that this tool will create to a file server (such as http://skydrive.live.com) and reply back here and post a link I can use to download your log files and take a closer look.
No cigar on setup.exe not finishing. I'm going to let it run overnight, but in the meantime here's the routine we use to create the installation. I'll send the log files tomorrow. Thanks, John...
1. Download Visual Studio 2005 MSDN ISO
2. Using WinRAR extract the Visual Studio 2005 MSDN ISO installer to: \\server\share\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\VendorSource\
3. Download Visual Studio Service Pack 1 (VS80sp1-KB926601-X86-ENU.exe)
4. Using WinRAR extract Visual Studio Service Pack 1 to: \\server\share\ServicePacksAndHotfixes\Win\32-bit\Windows\VisualStudio\VisualStudio2005SP1
5. Download Visual Studio 2005 Service Pack 1 Update for Vista (VS80sp1-KB932232-X86-ENU.exe)
6. Using WinRAR extract Visual Studio 2005 Service Pack 1 Update for Vista (VS80sp1-KB932232-X86-ENU.exe) patch to: \\server\share\ServicePacksAndHotfixes\Win\32-bit\Windows\VisualStudio\VisualStudio2005PostSP1_KB929470
7. Create batch file called ‘CreateVS2005RLAdminInstall.bat’ with the following text and run as an administrator:
ECHO Mapping drive to deploy share
Net use z: \\server\share
ECHO Creating folder structure
ECHO Creating Transform file
Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\VendorSource\vs\Setup\setup.exe /CreateTransform z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\RL_Packages\datafiles\vs2005.mst
ECHO GUI install choices For the MST...
ECHO 1. Do not send data to Microsoft
ECHO 2. Accept the Terms and Conditions
ECHO 3. Choose FULL Install and leave the default install directory
ECHO Creating an admin install point
Msiexec /a Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\VendorSource\vs\vs_setup.msi /L*vx z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\RL_Packages\logs\vsinstall.log TRANSFORMS=z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\RL_Packages\datafiles\vs2005.mst TARGETDIR=z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\RL_Packages\vs
ECHO Slipstream extracted Visual Studio Service Pack 1 into the admin installation directory
Msiexec /a z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\RL_Packages\vs\vs_setup.msi /p z:\ServicePacksAndHotfixes\Win\32-bit\Windows\VisualStudio\VisualStudio2005SP1\VS80sp1-KB926601-X86-ENU.msp /L*vx z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\RL_Packages\logs\vssp1.log
ECHO Slipstream extracted Visual Studio Service Pack 1 Update for Vista into the admin installation directory
Msiexec /a z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\RL_Packages\vs\vs_setup.msi /p z:\ServicePacksAndHotfixes\Win\32-bit\Windows\VisualStudio\VisualStudio2005PostSP1_KB932232\VS80sp1-KB932232-X86-ENU.msp /L*vx z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\RL_Packages\logs\kb932232.log
ECHO Copying DVD Source files to admin installation directory
XCOPY Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\VendorSource\vs\setup\*.* Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\RL_Packages\vs\setup\ /E /H /R /Y
Copy Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\VendorSource\vs\autorun.exe Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\RL_Packages\vs\ /Y
Copy Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\VendorSource\vs\autorun.inf Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\RL_Packages\vs\ /Y
Copy Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\VendorSource\vs\contents.htm Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\RL_Packages\vs\ /Y
Copy Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\VendorSource\vs\htmllite.dll Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\RL_Packages\vs\ /Y
Copy Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\VendorSource\vs\locdata.ini Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\RL_Packages\vs\ /Y
Copy Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\VendorSource\vs\msvcp80.dll Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\RL_Packages\vs\ /Y
Copy Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\VendorSource\vs\msvcr80.dll Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\RL_Packages\vs\ /Y
Copy Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\VendorSource\vs\readme.htm Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\RL_Packages\vs\ /Y
Copy Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\VendorSource\vs\setup.exe Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\RL_Packages\vs\ /Y
Copy Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\VendorSource\vs\setup.ini Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\RL_Packages\vs\ /Y
Copy Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\VendorSource\vs\toc.htm Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\RL_Packages\vs\ /Y
Copy Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\VendorSource\vs\VSKnownIssues.htm Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\RL_Packages\vs\ /Y
XCOPY Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\VendorSource\vs\wcu\64bitPrereq\*.* Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\RL_Packages\vs\wcu\64bitPrereq\ /E /H /R /Y
XCOPY Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\VendorSource\vs\wcu\ARM\*.* Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\RL_Packages\vs\wcu\ARM\ /E /H /R /Y
XCOPY Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\VendorSource\vs\wcu\DExplore\*.* Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\RL_Packages\vs\wcu\DExplore\ /E /H /R /Y
XCOPY Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\VendorSource\vs\wcu\dotNetFramework\*.* Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\RL_Packages\vs\wcu\dotNetFramework\ /E /H /R /Y
XCOPY Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\VendorSource\vs\wcu\NetCF\*.* Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\RL_Packages\vs\wcu\NetCF\ /E /H /R /Y
XCOPY Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\VendorSource\vs\wcu\SDK\*.* Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\RL_Packages\vs\wcu\SDK\ /E /H /R /Y
XCOPY Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\VendorSource\vs\wcu\SQLCE\*.* Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\RL_Packages\vs\wcu\SQLCE\ /E /H /R /Y
XCOPY Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\VendorSource\vs\wcu\SSE\*.* Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\RL_Packages\vs\wcu\SSE\ /E /H /R /Y
Copy Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\VendorSource\vs\wcu\runmsi.exe Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\RL_Packages\vs\wcu\ /Y
ECHO Creating the unattend.ini with MSDN included for the relevant CPU architecture
IF %PROCESSOR_ARCHITECTURE%==x86 Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\RL_Packages\vs\setup\setup.exe /createunattend Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\RL_Packages\Datafiles\vs2005unattended_onWin7x86.ini
IF %PROCESSOR_ARCHITECTURE%==AMD64 Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\RL_Packages\vs\setup\setup.exe /createunattend Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\RL_Packages\Datafiles\vs2005unattended_onWin7x64.ini
ECHO GUI install choices For the unattend.ini...
ECHO 3. Name should be set as Rufus Leonard
ECHO 4. Choose FULL Install and leave the default install directory
8. Download the x86 and 64-bit SQL 2005 Express Service Pack 2 installers from www.microsoft.com/.../details.aspx and overwrite the files in Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\VendorSource\vs\wcu\SSE
9. Once you’ve selected the install options for the unattended.ini and clicked finish, open the INI file (located in Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\RL_Packages\Datafiles\) in a text editor such as Notepad
10. Locate the [PreInstallOrder] section and remove the following lines if present:
gfn_mid framework ia64
gfn_mid framework amd64
gfn_mid windows installer 3.1
11. Locate the [InstallOrder] section and remove the following lines if present:
12. Locate the [PostInstallOrder] section and remove the following lines if present:
13. Locate the [gfn_mid framework] section and change the line that says InstallActionInteger=5 to say InstallActionInteger=1
14. Locate the [gfn_mid framework ia64] section and change the line that says InstallActionInteger=5 to say InstallActionInteger=1
15. Locate the [gfn_mid framework amd64] section and change the line that says InstallActionInteger=5 to say InstallActionInteger=1
16. Locate the [gfn_mid windows installer 3.1] section and change the line that says InstallActionInteger=5 to say InstallActionInteger=1
17. Save and close the INI file
18. Create a simple batch file with the following and runas as an administrator on the target machine
REM Installing custom Visual Studio 2005 with slipstreamed SP1 and patches [CPU Arch Specific]
Del %TEMP%\*.* /Q
Net use Z: \\server\share
REM Stop scanning agents which can interfere with the installation
Net stop “AVScannerX”
IF %PROCESSOR_ARCHITECTURE%==x86 GOTO x86
IF %PROCESSOR_ARCHITECTURE%==AMD64 GOTO AMD64
z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\RL_Packages\vs\setup\setup.exe /unattendfile Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\RL_Packages\Datafiles\vs2005unattended_onWin7x86.ini
z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\RL_Packages\vs\setup\setup.exe /unattendfile Z:\Apps\Win\x86\VisualStudio\VisualStudio_2005Pro\RL_Packages\Datafiles\vs2005unattended_onWin7x64.ini
Net start “AVScannerX”
Okay okay, I'm sad...
The collect.exe cab file and a screen capture are now up on skydrive, I've shared them out to your ms a/c.
23:00 UK. Home time already!
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?
Just wondering if you got the logs I put on Skydrive?
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.