无法在 Windows 10 上安装 Windows SDK 7.1 [英] Cannot install Windows SDK 7.1 on Windows 10

查看:90
本文介绍了无法在 Windows 10 上安装 Windows SDK 7.1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一名拥有 Windows 10 PC 的软件开发人员.我必须支持一些使用 Windows SDK 7.1 在 Visual Studio 2010 中编写的旧软件

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

在尝试搭建开发环境时,我已经成功安装了VS2010,来安装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:

某些组件无法安装

某些 Windows SDK 组件需要 RTM .NET Framework 4.安装程序检测到 .NET Framework 4 的预发布版本.如果您继续安装程序,将不会安装这些组件.如果要安装这些组件,请单击取消,然后从 http://安装 .NET Framework 4/go.microsoft.com/fwlink/?LinkID=187668,然后重新运行安装程序.

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.

然而,Windows 10 带有 .NET 4.5,据我所知还有另一个版本检查问题.

However, Windows 10 comes with .NET 4.5, so as far as I can tell there is yet another version check problem.

这不会让我太担心,但是在尝试安装 Visual Studio 2010 编译器更新时,这失败了,说

This would not worry me so much, but in attempting to install the Visual Studio 2010 compiler update, this fails, saying

无法安装,因为找不到 windows sdk 7.1

cannot install because windows sdk 7.1 is not found

尝试安装 .NET 4 失败,因为它检测到更高版本的 .NET.

Attempting to install .NET 4 fails because it detects a later version of .NET.

推荐答案

@dougg3 的回答脚本:

@dougg3's answer scripted:

首先安装SubInAcl,可以从微软下载此处.您可能需要将其添加到您的 PATH,例如:set PATH=%PATH%;C:Program Files (x86)Windows Resource KitsTools

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 KitsTools

然后在提升的 cmd 提示符下运行这些命令:

Then run these commands in an elevated cmd prompt:

for /f "tokens=2*" %%a in ('reg query "HKLMSoftwareMicrosoftNET Framework SetupNDPv4Client" /v Version /reg:32') do set "CurrentNDPv4ClientVersion=%%~b"
for /f "tokens=2*" %%a in ('reg query "HKLMSoftwareMicrosoftNET Framework SetupNDPv4Full" /v Version /reg:32') do set "CurrentNDPv4FullVersion=%%~b"
subinacl.exe /subkeyreg "HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftNET Framework SetupNDPv4" /setowner="%username%"
subinacl.exe /subkeyreg "HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftNET Framework SetupNDPv4" /grant="%username%"=f
reg ADD "HKLMSoftwareMicrosoftNET Framework SetupNDPv4Full" /v Version /t REG_SZ /d 4.0.30319 /reg:32 /f
reg ADD "HKLMSoftwareMicrosoftNET Framework SetupNDPv4Client" /v Version /t REG_SZ /d 4.0.30319 /reg:32 /f

echo start your installer now
pause

reg ADD "HKLMSoftwareMicrosoftNET Framework SetupNDPv4Client" /v Version /t REG_SZ /d %CurrentNDPv4ClientVersion% /reg:32 /f
reg ADD "HKLMSoftwareMicrosoftNET Framework SetupNDPv4Full" /v Version /t REG_SZ /d %CurrentNDPv4FullVersion% /reg:32 /f

subinacl.exe /subkeyreg "HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftNET Framework SetupNDPv4" /revoke="%username%"
subinacl.exe /subkeyreg "HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftNET Framework SetupNDPv4" /setowner="NT SERVICETrustedInstaller"

这篇关于无法在 Windows 10 上安装 Windows SDK 7.1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆