I am attempting to automate the installation of the Visual Studio 2008 SDK, but have not been able to figure out how to do so. Running vssdk_sfx.exe /? just displays the normal setup UI and not a usage dialog, and I haven’t been able to find any deployment documentation for this product. How can I perform a silent install of the VS 2008 SDK?
The Visual Studio 2008 SDK can be installed in silent mode by using the following steps:
- Download the vssdk_sfx.exe installer from http://www.microsoft.com/downloads/details.aspx?familyid=30402623-93ca-479a-867c-04dc45164f5b and save it to your local hard drive
- Extract the contents of the VS SDK setup by running the following: vssdk_sfx.exe /x:%temp%\vssdk2008_setup /q
- Run the VS SDK MSI in silent mode from within the extracted folder by running the following: msiexec /i %temp%\vssdk2008_setup\vssdk.msi /qn /l*v %temp%\vssdk2008setup.txt
- (optionally) Delete the copy of VS SDK setup that you extracted in step 2 by running the following: rd /s /q %temp%\vssdk2008_setup
A couple of notes to keep in mind when doing this:
- When running VS SDK setup in full UI mode, there is a check-box that allows you to choose not to install the documentation. The command line in step 3 above will install the default set of features for the VS 2008 SDK, which will include the documentation. If you need to install a non-default set of features, you will need to figure out the feature names from the MSI and then add the ADDLOCAL property to the end of the command line in step 3. The easiest way I’ve seen to do this is to enable Windows Installer verbose logging using these steps, then install in full UI mode with the documentation item unchecked. After the installation completes, you can look at the verbose log file created by the VS SDK installer in the %temp% directory and copy the exact value passed in for the ADDLOCAL property from that log file.
- The command line in step 3 above will perform a fully silent install of the VS 2008 SDK. If you want to perform an unattended install instead (meaning, there will be a small progress dialog during installation but no user interaction will be required), then you can change the /qn switch to /qb in the command line in step 3. Note that if you do that, the progress dialog will be blank during installation because the VS SDK MSI does not include the necessary strings in the ActionText and Error tables. In my experiments, I found that an unattended installation appears to be hung for a long time towards the end of installation while it is merging the SDK help documentation and completing the installation because the progress bar does not move and the progress dialog has no text. I was able to see the installer continue to make progress by looking at the processes in Task Manager and by looking at the verbose log file at %temp%\vssdk2008setup.txt.
<update date=”6/20/2008″> The VS SDK installer does not enable Windows Installer verbose logging by default. Added a link to information about how to enable verbose logging if needed. </update>