简体   繁体   English

检查是否已安装.NET Framework 4.5使用Installshield 2010

[英]Check .NET Framework 4.5 is installed or not Using Installshield 2010

I'm using InstallShield 2010. I want to check whether .NET framework 4.5 is installed or not on the machine. 我正在使用InstallShield 2010.我想检查计算机上是否安装了.NET framework 4.5。

I can check .NET framework 4.0 is installed or not from registry, but I'm unable to find any registry key for .NET framework 4.5. 我可以检查.NET Framework 4.0是否已安装在注册表中,但我无法找到.NET Framework 4.5的任何注册表项。

According to the MSDN article here: http://msdn.microsoft.com/en-us/library/hh925568(v=vs.110).aspx 根据MSDN上的文章: http//msdn.microsoft.com/en-us/library/hh925568(v = vs.110).aspx

To find the installed .NET Framework versions manually (versions 4.5 and later) 手动查找已安装的.NET Framework版本(版本4.5及更高版本)

  • On the Start menu, choose Run. 在“开始”菜单上,选择“运行”。
  • In the Open box, enter regedit.exe. 在“打开”框中,输入regedit.exe。 (You must have administrative credentials to run regedit.exe.) (您必须具有管理凭据才能运行regedit.exe。)
  • In the Registry Editor, open the following subkey: HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\v4\\Full Check for a DWORD value named Release. 在注册表编辑器中,打开以下子项:HKEY_LOCAL_MACHINE \\ SOFTWARE \\ Microsoft \\ NET Framework Setup \\ NDP \\ v4 \\ Full检查名为Release的DWORD值。 The existence of the Release DWORD indicates that the .NET Framework 4.5 or newer has been installed on that computer. Release DWORD的存在表明该计算机上已安装.NET Framework 4.5或更高版本。

In other words under InstallShield, check for the existence of the Release DWORD at the registry location HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\v4\\Full 换句话说,在InstallShield下,检查注册表位置是否存在Release DWORD HKEY_LOCAL_MACHINE \\ SOFTWARE \\ Microsoft \\ NET Framework Setup \\ NDP \\ v4 \\ Full

Form Blog .NET 4.5 is an in-place replacement for .NET 4.0 and similar SO answer 表单博客.NET 4.5是.NET 4.0和类似SO答案 的就地替代品

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client

check the Version value there. 检查那里的版本值。

If it starts with "4.0" you are running on the 4.0 runtime, if it starts with "4.5" you are running on the 4.5 runtime. 如果以“4.0”开头,则表示您正在4.0运行时运行,如果以“4.5”开头,则表示您在4.5运行时运行。

从2015-06-01开始,在MSDN中描述了检查高达4.6的任何版本的方法: 如何:确定安装了哪些.NET Framework版本

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM