过去过来

导航

在Windows 10 64-bit上安装Windows SDK 7.1和.NET4

目的:

成功在window10上安装window sdk7.1 和 .NET Framework 4

需求:

support some older software written in Visual Studio 2010 using Windows SDK 7.1

步骤:

一、卸载.NET Framework 4 以上版本

 

如果安装了.NET Framework 4 以上的版本,则即使sdk7.1安装成功,在安装.NET 4也可能出现问题。

先卸载,然后安装.NET 4,然后在安装所需要的.NET的版本,比如4.5或者4.6。

 

二、卸载Microsoft Visual Studio C++ 2010

 

适用情况一:

解决方案来自:

http://www.cnblogs.com/duanshuiliu/archive/2013/04/02/2994776.html

下面4个组件尤其需要卸载:

Visual c++ 2010 x86 redistributable、

Visual c++ 2010 x64 redistributable(64位windows)、

Microsoft Visual C++  Compilers 2010 X86和X64版本(有些电脑可能不存在则不必理会)。

值得注意的是后面两个需要在注册表中查找是否存在,路径为HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall,

查找Display name为“Microsoft Visual C++  Compilers 2010 Standard - enu - x86”和“Microsoft Visual C++  Compilers 2010 Standard - enu - x64”,然后根据上述链接方法进行卸载。

 

适用情况二:

解决方案来自:

https://forum.openrobotino.org/forum/main-forum/software/211-matlab-64bit-compiler-problems-with-sdk-7-1-under-windows-10

首先,Uninstall any Visual C++ 2010 Redistributables from the control panel

也就是卸载Visual C++ 2010相关组件,同上面的适用情况一类似

 

其次,Download the corresponding offline ISO image from the Windows SDK archive

这里用的是iso镜像(https://www.microsoft.com/en-us/download/details.aspx?id=8442),

根据自己的情况选择不同的镜像
x86 ISO File Name:GRMSDK_EN_DVD.iso      32位系统
x64 ISO File Name:GRMSDKX_EN_DVD.iso    64位系统
Itanium ISO File Name:GRMSDKIAI_EN_DVD.iso


最后,After mounting the image to an virtual disk (Like Virtual clone drive) , open F:\Setup\SDKSetup.exe directly

挂在镜像,点击安装。我做的时候没后这么顺利,总出现一个错误提示

Some Windows SDK components require the RTM .NET Framework 4. Setup detected a pre-release version of .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 https://go.microsoft.com/fwlink/?LinkID=187668 and then rerun Setup.

Click OK to continue.

点击OK,一点都不OK,哪里来的pre-release version of .NET Framework4.

原来在win10 64bit系统中,仍需要修改2个注册entry:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\NET Framework Setup\NDP\v4\Full\Version
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\NET Framework Setup\NDP\v4\Client\Version

找到它们,

image

将Client和Full这两个的Version的值由4.6.01586(需要记住)改为4.0.30319,这个修改需要权限。

如何修改权限,根据下面的链接自行修改,https://www.groovypost.com/howto/take-full-permissions-control-edit-protected-registry-keys/

由于隐私问题,这里不好演示。其基本内容是先修改Owner,然后添加Permission Entry(也就是选择一个principal)

image

保存修改后就有权限修改了,修改了也就可以顺利安装了。

最后,再返回这里,改回原来的值。

 

三、测试结果

在我的Matlab2013a中设置默认的C compiler。

>> mex -setup

Welcome to mex -setup.  This utility will help you set up  

a default compiler.  For a list of supported compilers, see  

http://www.mathworks.com/support/compilers/R2013a/win64.html

Please choose your compiler for building MEX-files:

Would you like mex to locate installed compilers [y]/n? y

Select a compiler:

[1] Microsoft Software Development Kit (SDK) 7.1 in C:\Program Files (x86)\Microsoft Visual Studio 10.0

[0] None

Compiler: 1

Please verify your choices:

Compiler: Microsoft Software Development Kit (SDK) 7.1

Location: C:\Program Files (x86)\Microsoft Visual Studio 10.0

Are these correct [y]/n? y

 

omit….

>>

 

后记

如果为matlab2013a在win10 64bit中配置sdk7.1中的C编译器,有人直接安装visual studio2012便可以了。不过我用的是visual studio2015,不想安装前个版本。图简单的,可以试一试。

 

 

参考:

Questions

http://stackoverflow.com/questions/32091593/cannot-install-windows-sdk-7-1-on-windows-10

solutions

https://www.mathworks.com/matlabcentral/answers/101105-how-do-i-install-microsoft-windows-sdk-7-1

https://forum.openrobotino.org/forum/main-forum/software/211-matlab-64bit-compiler-problems-with-sdk-7-1-under-windows-10

http://stackoverflow.com/questions/31455926/windows-sdk-setup-failure

https://www.groovypost.com/howto/take-full-permissions-control-edit-protected-registry-keys/

resources

Microsoft Windows SDK for Windows 7 and .NET Framework 4 (ISO):

https://www.microsoft.com/en-us/download/details.aspx?id=8442

posted on 2017-04-03 12:44  过去过来  阅读(27439)  评论(1编辑  收藏  举报