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

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/19265017/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-03 12:30:18  来源:igfitidea点击:

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

.netversion.net-4.5installshield-2010

提问by Harish Reddy

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 的任何注册表项。

回答by DDA

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)

  • On the Start menu, choose Run.
  • In the Open box, enter regedit.exe. (You must have administrative credentials to run 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. The existence of the Release DWORD indicates that the .NET Framework 4.5 or newer has been installed on that computer.

手动查找已安装的 .NET Framework 版本(版本 4.5 及更高版本)

  • 在开始菜单上,选择运行。
  • 在打开框中,输入 regedit.exe。(您必须具有管理凭据才能运行 regedit.exe。)
  • 在注册表编辑器中,打开以下子项:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full 检查名为 Release 的 DWORD 值。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 下,检查注册表位置 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full 处是否存在 Release DWORD

回答by MikroDel

Form Blog .NET 4.5 is an in-place replacement for .NET 4.0and similar SO answer

Form Blog .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 运行时上运行。

回答by Eric Ouellet

As of 2015-06-01, The way to check any version up to 4.6 is described at MSDN: How to: Determine Which .NET Framework Versions Are Installed

截至 2015 年 6 月 1 日,MSDN 中描述了检查任何版本高达 4.6 的方法:如何:确定安装了哪些 .NET Framework 版本