Cannot install Windows SDK 7.1 on Windows 10
I'm a software developer with a Windows 10 PC. I have to support some older software written in Visual Studio 2010 using Windows SDK 7.1
In trying to set up the development environment, I have successfully installed VS2010, and come to install Windows SDK 7.1, however the installer gives the error:
Some components cannot be installed
Some Windows SDK components require the RTM .NET Framework 4. Setup detected a pre-release version of the .NET Framework 4. If you continue with Setup, these components will not be installed. If you want to install these components, click Cancel, then install the .NET Framework 4 from http://go.microsoft.com/fwlink/?LinkID=187668 and then rerun Setup.
However, Windows 10 comes with .NET 4.5, so as far as I can tell there is yet another version check problem.
This would not worry me so much, but in attempting to install the Visual Studio 2010 compiler update, this fails, saying
cannot install because windows sdk 7.1 is not found
Attempting to install .NET 4 fails because it detects a later version of .NET.
Solution 1:
I stumbled across another workaround, which I've also posted on a msdn thread:
Uninstall any Visual C++ 2010 Redistributables from the control panel first.
Download the corresponding offline ISO image from the Windows SDK archive. This lists which ISO is which.
After mounting the image, open F:\Setup\SDKSetup.exe directly.
Solution 2:
I just ran into this same problem. No idea how safe this actually is to do, but I was able to work around it by temporarily fooling the installer into thinking I had a different version of .NET 4.0 installed. I opened Process Monitor and used it to monitor everything that setup.exe was doing in order to find out how it was determining that I had a "pre-release" version of .NET 4.0.
It turns out that it looks at these two strings in the registry:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\NET Framework Setup\NDP\v4\Client\Version
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\NET Framework Setup\NDP\v4\Full\Version
On my Windows 10 machine, these currently are both 4.6.00079
. The installer doesn't seem to like this value. I temporarily replaced both of them with the string 4.0.30319
in regedit to match the value from InstallPath, and that seemed to do the trick. And of course, when I was finished, I put them back the way they originally were.
However, I did not have permission to change those values, so it was a bit tricky. I right-clicked on the Client
key, chose Permissions, and clicked Advanced. Then I changed the owner to my user account instead of TrustedInstaller. This allowed me to add permissions for Full Control for myself so I could modify the Version
value. I repeated the same process on the Full
key. After the installer completed successfully, I put the original version values back in (4.6.00079
), deleted the permissions I added for myself, and restored the owner to TrustedInstaller (to do that, type NT SERVICE\TrustedInstaller
as the username).
There might be a safer/easier way of intercepting the registry reads than actually modifying the registry, but this was simple enough for me!
Solution 3:
@dougg3's answer scripted:
First install SubInAcl,can be downloaded from Microsoft here. You may need to add it to your PATH, ex: set PATH=%PATH%;C:\Program Files (x86)\Windows Resource Kits\Tools
Then run these commands in an elevated cmd prompt:
for /f "tokens=2*" %%a in ('reg query "HKLM\Software\Microsoft\NET Framework Setup\NDP\v4\Client" /v Version /reg:32') do set "CurrentNDPv4ClientVersion=%%~b"
for /f "tokens=2*" %%a in ('reg query "HKLM\Software\Microsoft\NET Framework Setup\NDP\v4\Full" /v Version /reg:32') do set "CurrentNDPv4FullVersion=%%~b"
subinacl.exe /subkeyreg "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\NET Framework Setup\NDP\v4" /setowner="%username%"
subinacl.exe /subkeyreg "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\NET Framework Setup\NDP\v4" /grant="%username%"=f
reg ADD "HKLM\Software\Microsoft\NET Framework Setup\NDP\v4\Full" /v Version /t REG_SZ /d 4.0.30319 /reg:32 /f
reg ADD "HKLM\Software\Microsoft\NET Framework Setup\NDP\v4\Client" /v Version /t REG_SZ /d 4.0.30319 /reg:32 /f
echo start your installer now
pause
reg ADD "HKLM\Software\Microsoft\NET Framework Setup\NDP\v4\Client" /v Version /t REG_SZ /d %CurrentNDPv4ClientVersion% /reg:32 /f
reg ADD "HKLM\Software\Microsoft\NET Framework Setup\NDP\v4\Full" /v Version /t REG_SZ /d %CurrentNDPv4FullVersion% /reg:32 /f
subinacl.exe /subkeyreg "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\NET Framework Setup\NDP\v4" /revoke="%username%"
subinacl.exe /subkeyreg "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\NET Framework Setup\NDP\v4" /setowner="NT SERVICE\TrustedInstaller"
Solution 4:
Great answer by Dougg3 above. Just so it helps others, I went through the process and took some screen shots in case it helps anybody. I do have 64 bit Windows 10.
This is the reg edit file path that Dougg referenced. Here click on Advanced button
Where it says Owner on the top click the Change link
The next image has two steps - first click on Advanced from "Select User or Group" then click on Find Now button on next dialogue which has the same title.
Find the user you want to change owner to then click ok
Click ok on the next page
Go to your user you just selected on previous dialogues then select Allow Full Control, then click OK
Now you're able to edit the version.
After you're finished with this revert the version number to what it was before and undo giving yourself the Full Control for that registry.
Solution 5:
Install SDK 7.1 on your computer, it will mostly fail on compiler extras, but you need this first.
Now install this compiler package from Microsoft:
http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=4422
It will then install the compiler and make it possible to use the compiler.