安装Windows SDK 7.1时出现错误

90

我在安装Windows SDK时遇到了一个错误,我在互联网上看到过这个错误,但没有任何解决方案适用于我。这是我收到的日志:

9:43:37 AM Monday, October 14, 2013: SFX C:\Program Files\Microsoft SDKs\Windows\v7.1\Setup\SFX\vcredist_x64.exe installation started with log file C:\Users\clarkbd\AppData\Local\Temp\Microsoft Windows SDK for Windows 7_c3c42538-8a3e-439d-be39-aee3078ca098_SFX.log
9:43:43 AM Monday, October 14, 2013: C:\Program Files\Microsoft SDKs\Windows\v7.1\Setup\SFX\vcredist_x64.exe installation failed with return code 1603
9:43:53 AM Monday, October 14, 2013: [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)
9:43:53 AM Monday, October 14, 2013: [SDKSetup:Info] Config_Products_InstallNew: End installation of new product: Microsoft Windows SDK for Windows 7
9:43:53 AM Monday, October 14, 2013: [SDKSetup:Error] Config_Products_Install: Windows SDK Setup (failed): 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. Stack:    at SDKSetup.Product.ConfigureNewProduct(ManualResetEvent CancelEvent)      at SDKSetup.Product.SetupProduct(TaskMode taskMode, ManualResetEvent CancelEvent)       at SDKSetup.ProductCollection.SetupProducts(TaskMode taskMode, DownloadManager downloadManager, ManualResetEvent cancelEvent)       at SDKSetup.ConfigProducts.DoCurrentTask(TaskMode Task)

当我尝试单独运行vcredist_x64时,出现以下错误:

MSI (s) (80:5C) [09:51:50:971]: Product: Microsoft Visual C++ 2010  x64 Redistributable - 10.0.30319 -- A later version of Microsoft Visual C++ 2010  x64 Redistributable - 10.0.30319 is already installed.
根据我在网上看到的每个解决方案,我将卸载Redistributable并继续安装。问题是我没有安装任何VC ++ 2010 Redistributable(只有2005和2008)。除了主程序之外,唯一的东西就是名为“Microsoft Visual Studio 2010 Express Prerequisites x64 - ENU”的东西。卸载它对我收到的错误没有影响。我的电脑上有些东西告诉SDK我已经安装了这个redist,但我不确定是什么。有人能为我提供一些帮助吗?
编辑:即使我完全卸载Visual C++ 2010,这个问题仍然存在。我还能做什么来从我的计算机中删除这个软件的所有痕迹吗?
编辑2:在搜索注册表后,我发现NI使用其一个程序安装了自己的Visual C ++ 2010 Redistributable,但它未包含在“添加或删除程序”列表中。我已经卸载了它,希望sdk能够正确安装。
编辑3:没有成功,仍然收到相同的错误。我可以在注册表中找到其他2010 Redistributable版本,但尝试手动执行卸载字符串时,只是告诉我我只能在已安装的程序上运行它。如果我知道vcredist如何查找当前安装的redistributions,那么这将简单得多。
4个回答

133

这是一个已知问题,http://support.microsoft.com/kb/2717426

原因

当您在计算机上安装有新版本的Visual C++ 2010 Redistributable时,会发生此问题。

解决方案

要解决此问题,您必须在安装Windows 7 SDK之前卸载所有版本的Visual C++ 2010 Redistributable。 您可能已经安装了一个或多个以下产品:

  • Microsoft Visual C++ 2010 x86 Redistributable
  • Microsoft Visual C++ 2010 x64 Redistributable

在卸载Microsoft Visual C++ 2010 Redistributable产品后,您可以安装Windows 7 SDK。 安装Windows 7 SDK后,您可以重新安装新版本的Visual C++ 2010 Redistributable产品,以恢复Visual C++ 2010 Redistributable产品的原始状态。

卸载图片


4
我有两个这样的东西。移除它们后,SDK 安装成功。 - Adam Bruss
1
最新版本(截至目前)被称为“Microsoft Visual C++ 2010 SP1 Redistributable Package”,版本号为“10.0.40219.1”。我花了一些时间才弄清楚我需要搜索“SP1”,所以我把这个留在这里给其他人参考。 - Terrabits

66

成功! 我使用Microsoft的Fix it工具从我的计算机中清除了vc++ 2010可再发行程序: http://support.microsoft.com/mats/Program_Install_and_Uninstall

它能够找到可再发行程序的x64和x86版本并卸载它,从注册表中删除了约120个条目,并允许sdk安装继续进行。这与NI的vc++ 2010可再发行程序无关。


15
这个答案对我很有帮助,但对我来说使用“添加或删除程序”就足够了。 - cubuspl42
这对大多数人来说是正确的。但在我的情况下不是这样 =/ - Red Alert
9
日志中的错误为“DDSet_Error: Patch Hooks: Missing required property 'ProductFamily': Setup cannot continue.”和“DDSet_Warning: Setup failed while calling 'getDLLName'. System error: Cannot create a file when that file already exists.” 卸载x86和x64的C++ 2010 redists后,这个问题被解决了。 - Diederik
尽管我使用“添加或删除程序”从我的计算机中删除了所有VC++可再发行组件,但这还不够。但是,在使用@RedAlert提到的Microsoft的Fix It实用程序之后,SDK安装对我起作用了。 - Christian Junk
我尝试了https://dev59.com/anI-5IYBdhLWcg3wW24L上的答案,这让我有所进展,但由于未正确卸载VC++编译器而卡住了。 因此,虽然对我来说不是可再发行组件,但我成功地使用Fix it卸载了阻止我的安装的东西。 谢谢! - Madcowswe
显示剩余2条评论

4
我在Win7 Prof 64位系统上遇到了Windows SDK网络安装程序的问题。 卸载/重新安装VS 2010可再发行组件没有起到任何作用。只有在下载Windows SDK ISO文件(x64版本为GRMSDKX_EN_DVD.iso)后,安装才成功完成。
我的理论是:网络安装程序以某种方式选择了错误的架构,导致安装失败。

2
以上所有答案都对我有所帮助,但是没有一个真正适用于我。
最终,我通过在安装 Visual Express 2010 之前安装 SDK 来成功编译了 64 位。因此:
  1. (卸载 Visual Express 2010,如果某些 Visual 编译器仍被视为已安装但未显示在“程序和功能”面板中,则可以使用 this registry hack
  2. 安装 Windows SDK
  3. 安装 Visual Express 2010
  4. 将默认库搜索路径配置指向 SDK
我懒得卸载 Visual Express、重新安装 SDK,然后再次安装 Visual Express,但我在 VirtualBox VM 中完成了所有操作,我会珍藏它并放在银行的保险箱里! ;)

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接