I spent days (not full time, eh ^^) figuring out how to do this one. So here are pointers for installing Visual C++ 2010 Express (just pointers because I didn’t keep it in the end – so basically I’ll just give you the offline installer), and the most detailed Windows SDK installation troubleshooting guide I can think of, after trying every posted solution and ending up finding out a new (yet simple) one.
NB: all this was done on Windows 7 x64 Enterprise.
Getting the offline installers
For Visual C++ 2010 Express, you can’t get an offline installer without downloading the full Visual Studio 2010 Express ISO. So, well just go there and pick All – Offline Install ISO image file. You can then just mount the ISO (using a tool such as Daemon Tools), or extract it (for instance 7-Zip can do it) into some directory, then browse to the VCExpress folder and run the setup there. To save disk space, you can just keep the C++ folder (VCExpress) and discard the rest (around 380 MiB if compressed using 7-Zip vs 693 MiB for the full ISO).
For the Windows SDK, the offline installer can be found there (Microsoft Windows SDK for Windows 7 and .NET Framework 4 (ISO)). Also, note that the “web” installer is (as of today) no more up-to-date than the offline one. Note that you have to choose between 3 ISOs: GRMSDK_EN_DVD.iso is for x86, GRMSDKX_EN_DVD.iso is for x64, and GRMSDKIAI_EN_DVD.iso is for Itanium. Then, same story as for Visual Studio: either mount the ISO or extract it somewhere.
Solving the most useless error message I’ve ever seen
NB: if you’re in a hurry, just skip until the “Summary of possible solutions for this Windows SDK installation problem” section.
When installing the Windows SDK, I got stuck by the following error message:
A problem occurred while installing selected Windows SDK components.
Installation of the “Microsoft Windows SDK for Windows 7” product has reported the following error: Please refer to Samples\Setup\HTML\ConfigDetails.htm document for further information.
Please attempt to resolve the problem and then start Windows SDK setup again. If you continue to have problems with this issue, please visit the SDK team support page at http://go.microsoft.com/fwlink/?LinkId=130245.
Click the View Log button to review the installation log.
To exit, click Finish.
As you can see, there is no real error message there, plus the file referred to by the message is nowhere to be found. At first I tried searching online for solutions, here is what I found (NB: none of those worked for me, but maybe they will for you, as the error message is likely a generic error which can be triggered by quite a few very different causes):
- On CTRL+F5, they suggest to run regedit then change the ownership of key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components(and its subkeys) from SYSTEM to the Administrators group (see the link if you need more details on how to do this).
- On that same site, they say that if the previous method doesn’t work, you can also make sure that your TEMP and TMP environment variables all point to the same folder (so in my case, and probably yours too, it means deleting your user-specific TEMP and TMP variables). Once again, check out the above-mentioned link if you need more details on how to perform this.
Those fixes didn’t work for me, and I realized I could check the installation log. Which indicated what component was screwing everything up:
10:16:59 06 April 2011: F:\PROGRAMMING\Microsoft SDKs\Windows\v7.1\Setup\SFX\vcredist_x64.exe installation failed with return code 5100
10:17:15 06 April 2011: [SDKSetup:Error] Config_Products_Install: Installation of Product Microsoft Windows SDK for Windows 7 (failed): Please refer to Samples\Setup\HTML\ConfigDetails.htm document for further information. Stack: at SDKSetup.Product.ConfigureRelatedSfx() at SDKSetup.Product.ConfigureNewProduct(ManualResetEvent CancelEvent)
So… vcredist_x64.exe is the culprit then. (Note that if your installation log doesn’t indicate the same error, then probably you can stop reading now as my fix will most likely not work in your case). As previously, I first tried to search online for solutions. The only thing I found was this, basically saying “make sure the Windows Modules Installer service is up and running”. Mine was already.
Finally, I thought why not try to install that vcredist_x64.exe myself, stand-alone. Vcredist_x64.exe is the name taken by basically every Microsoft Visual C++ Redistributable Package (x64): any version of it. So I first tried the latest one, Visual C++ 2010 SP1 Redistributable Package (x64), which offered me to either repair or remove. I picked repair. I tried installing the Windows SDK again, still no success. I thought maybe the vcredist aren’t cumulative, so tried to install the previous version, Visual C++ 2010 Redistributable Package (x64)… and it failed, saying that I already had a more recent version (which was true since I had SP1). But that error message puzzled me, as it really didn’t look graceful: it felt more like a real failure rather than a “you already have a better version, no need to add this one so all done”. And so I decided to uninstall my Visual C++ 2010 SP1 (I just reran the installer previously mentioned and this time picked remove instead of repair). Note that to be able to uninstall VC++ 2010 SP1 I had to kill parts of my Catalyst drivers (the AMD Fuel service as well as CCC.exe (Catalyst Control Center:Host application) in the task manager).
With the Visual C++ 2010 SP1 Redistributable Package removed, I ran the Windows SDK installer again and it worked fine. It installed the Visual C++ 2010 Redistributable Package, which I updated then with its SP1. All working good now, hurray! 🙂
Note that the Windows SDK installs both the x86 and x64 versions of Visual C++ 2010 Redistributable. I didn’t have the x86 version already installed, but if you do my best guess is that you’ll need to remove it too.
Summary of possible solutions for this Windows SDK installation problem
- Uninstall Visual C++ 2010 SP1 Redistributable Package (as of today this is totally mandatory to be able to install the Windows SDK) (both x64 and x86 if applicable)
- Make sure the Windows Modules Installer service is up and running
- Change ownership of
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Componentsto the Administrators group (not sure if it’s really needed)
- Make sure that all your TEMP and TMP environment variables (global and user) all point to the same folder (once again, not sure if it’s really needed… but it’s always good to have all temporary folders at the same place: easier to clean ;))