Aaron Stebner's WebLog

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

Mailbag: How to install the Visual Studio 2008 SDK in silent mode

Mailbag: How to install the Visual Studio 2008 SDK in silent mode

  • Comments 7

Question:

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?

Answer:

The Visual Studio 2008 SDK can be installed in silent mode by using the following steps:

  1. 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
  2. Extract the contents of the VS SDK setup by running the following:  vssdk_sfx.exe /x:%temp%\vssdk2008_setup /q
  3. 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
  4. (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>

 

  • I don't suppose that there's a followup somewhere on how to do this for the Win7 PSDK?  I tried following this, but it appears to install from a gazillion different MSIs, instead of just one...

  • Hi GordonShumacher - I'm sorry, but I don't have any experience with the Windows 7 SDK, and it is still in pre-release form only (and only as an ISO file from what I can tell).  Hopefully there will be some documentation for deployment and installation once the final version is released.

    If it is anything like the Windows SDK components that are installed as a part of VS 2008, then you will likely need to deploy each of the individual MSIs for the SDK components that you require on your systems for your scenarios.

  • So, the Win 7 SDK is released, and is available

    in web installer form at

    http://www.microsoft.com/downloads/details.aspx?FamilyID=c17ba869-9671-4330-a63e-1fd44e0e2505

    though the release notes do not document

    how to deploy it (they just say run the

    installer).

    Sadly, running that with /x does unpack

    a .cab, an .exe, and some .dll's, but no

    .msi's, so something must be different.

    It'd be sweet to know how to do an unattended

    install.  Maybe the answer will be to use

    autohotkey, or to manually download the .msi's

    logged by a manual install; I haven't tried

    those routes yet, was hoping there was a simpler

    one.

  • At first glance, it looks like you just

    have to download all the files downloaded

    by the installer (see the log), then

    run msiexec /i on all the .msi's it downloaded.

    Haven't checked to see if the resulting SDK

    can really build things yet, though.

  • Hi Dankegel - I didn't work on the Windows SDK setup team here at Microsoft, so my knowledge of how that installer works is somewhat limited.  They have a web installer that doesn't contain any of the product payload and an ISO file that contains all of it.

    As an experiment, I downloaded winsdk_web.exe from http://www.microsoft.com/downloads/details.aspx?FamilyID=c17ba869-9671-4330-a63e-1fd44e0e2505, then extracted it with the /x command line switch.  Then I ran setup.exe /? and it shows a bunch of command line options, including the silent /q switch.

    However, it appears that the silent mode doesn't try to download the payload it needs and instead just fails.

    I think your best option here is going to be to download the ISO file from http://www.microsoft.com/downloads/details.aspx?FamilyID=71deb800-c591-4f97-a900-bea146e4fae1 (unfortunately, it is huge), then run the setup in silent mode from there.  It should work correctly since all of the payload is included in the ISO file.

    I couldn't tell whether there was a way to install only a subset of the payload, but I think you're on the right track - you can try to run each of the MSI files for the features of the Windows SDK individually with standard Windows Installer command line parameters.

    Hopefully this helps.

  • Hi Aaron,

    Trying to install Windows 7 SDK with Dot Net 3.5 SP1 by using WinSDK_Web seems to take for ever. Even cancelling the install seems to take for ever. Is there a log file that can be consulted to see what is going on?

    Thanks

  • Hi Umesh - I don't know for sure if the Windows 7 SDK setup creates log files or not.  I'd suggest taking a look in the %temp% directory to see if there are any files or folders created during the setup process.

    It might also help to try to download and install from the ISO instead of using the web-based installer.  You can find the download location for the ISO at www.microsoft.com/.../details.aspx.

Page 1 of 1 (7 items)
Leave a Comment
  • Please add 2 and 5 and type the answer here:
  • Post