https://msdn.microsoft.com/en-us/library/hh925568(v=vs.110).aspx

To find .NET Framework versions by viewing the registry (.NET Framework 1-4)

  1. On the Start menu, choose Run.

  2. In the Open box, enter regedit.exe.

    You must have administrative credentials to run regedit.exe.

  3. In the Registry Editor, open the following subkey:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP

    The installed versions are listed under the NDP subkey. The version number is stored in the Version entry. For the .NET Framework 4 the Versionentry is under the Client or Full subkey (under NDP), or under both subkeys.

    Note

    The "NET Framework Setup" folder in the registry does not begin with a period.

To find .NET Framework versions by viewing the registry (.NET Framework 4.5 and later)

  1. On the Start menu, choose Run.

  2. In the Open box, enter regedit.exe.

    You must have administrative credentials to run regedit.exe.

  3. In the Registry Editor, open the following subkey:

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

    Note that the path to the Full subkey includes the subkey Net Framework rather than .NET Framework.

    Note

    If the Full subkey is not present, then you do not have the .NET Framework 4.5 or later installed.

    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.

    The value of the Release DWORD indicates which version of the .NET Framework is installed.

    Value of the Release DWORD

    Version

    378389

    .NET Framework 4.5

    378675

    .NET Framework 4.5.1 installed with Windows 8.1 or Windows Server 2012 R2

    378758

    .NET Framework 4.5.1 installed on Windows 8, Windows 7 SP1, or Windows Vista SP2

    379893

    .NET Framework 4.5.2

    On Windows 10 systems: 393295

    On all other OS versions: 393297

    .NET Framework 4.6

    On Windows 10 November Update systems: 394254

    On all other OS versions: 394271

    .NET Framework 4.6.1

    On Windows 10 Anniversary Update: 394802

    On all other OS versions: 394806

    .NET Framework 4.6.2

To find .NET Framework versions by querying the registry in code (.NET Framework 1-4)

  • Use the Microsoft.Win32.RegistryKey class to access the Software\Microsoft\NET Framework Setup\NDP\ subkey under HKEY_LOCAL_MACHINE in the Windows registry.

    The following code shows an example of this query.

检测电脑安装的net framework版本的更多相关文章

  1. Inno Setup 检测已安装的.NET Framework 版本

    翻译自:http://kynosarges.org/DotNetVersion.html 由 Jordan Russell 写的 Inno Setup 是一个伟大的安装脚本程序,但缺乏一个内置的函数来 ...

  2. C# winform 检测当前电脑安装的.net framework版本

    private static bool GetDotNetRelease(int release) { const string subkey = @"SOFTWARE\Microsoft\ ...

  3. Windows查看电脑上安装的.Net Framework版本的五种方法(转)

    1.查看安装文件判断Framwork版本号 打开资源管理器,比如我的电脑,再地址栏输入%systemroot%\Microsoft.NET\Framework后单击“转到”或者按回车. 在新文件夹中查 ...

  4. 如何:确定已安装的 .NET Framework 版本

    用户可在他们的计算机上安装和运行 .NET Framework 的多个版本. 当你开发或部署应用时,你可能需要知道用户的计算机上安装了哪些 .NET Framework 版本. .NET Framew ...

  5. 同一个电脑安装两个jdk版本

    同一个电脑安装两个jdk版本 场景:公司项目使用的jdk为1.,最近不是很忙,学习scala.该系统使用到了jdk1.8的特性,所以I need 俩版本,开整!!! . 准备两个版本的jdk我的两个j ...

  6. C#winform检测电脑安装的.netframework版本和是否安装了某软件

    代码如下: //C#获取已安装 .NET Framework 版本 private static string[] GetDotNetVersions() { DirectoryInfo[] dire ...

  7. C# 查看本机安装的NET Framework 版本

    https://docs.microsoft.com/zh-cn/dotnet/framework/migration-guide/how-to-determine-which-versions-ar ...

  8. 如何查看本机上安装的.NET Framework版本

    在开始菜单选择"运行", 或者快捷键 “windows键+R” 在命令窗口输入regedit.exe,打开注册表 在注册表中定位到如下节点 HKEY_LOCAL_MACHINE\S ...

  9. 一台电脑安装两个不同版本的MySQL

    背景: 本人电脑上已有mysql-8.0.12-winx64,并且可以使用.但由于工作需要,得使用mysql-5.5.59-winx64,已有mysql-5.5.59-winx64的解压好的安装包 参 ...

随机推荐

  1. BZOJ4417: [Shoi2013]超级跳马

    Description 现有一个n行m列的棋盘,一只马欲从棋盘的左上角跳到右下角.每一步它向右跳奇数列,且跳到本行或相邻行.跳越期间,马不能离开棋盘.例如,当n = 3, m = 10时,下图是一种可 ...

  2. python requests库学习

    Python 第三方 http 库-Requests 学习 安装 Requests 1.通过pip安装 $ pip install requests 2.或者,下载代码后安装: $ git clone ...

  3. 三星S4接电话黑屏无法挂断通话

    最近发现S4的通话距离感应起出了问题,接电话后直接熄屏,按什么按钮都没有反应.通话结束后只能等对方挂断才会恢复正常,再或者长按9秒电源键强制重启.极大的影响了实用体验.网上搜了下,发现这样的问题还不少 ...

  4. c#委托事件及其讲解

    一定要标明出处,波哥的文章.所有文章都值得一看.这篇是摘抄的大白话之C#事件讲解.委托 http://www.cnblogs.com/wudiwushen/archive/2010/04/20/170 ...

  5. 使用SimpleXML应该注意的问题有哪些?

    SimpleXML提供了一套简单快速的XML操作方法,大大地提高了XML操作的效率. 但是有时不小心也会带来不小的麻烦,看下面一段代码: $xml=simplexml_load_string('< ...

  6. Reset RequiredFieldValidator 重置 验证控件

    <td style="width:100px;">姓名<span class="must_star">*</span>< ...

  7. Symantec Antivirus (SAV) for Linux Installation Checklist

    https://support.symantec.com/en_US/article.TECH134163.html

  8. maven--私服的搭建(Nexus的使用)

    Nexus常用功能就是:指定私服的中央地址.将自己的Maven项目指定到私服地址.从私服下载中央库的项目索引.从私服仓库下载依赖组件.将第三方项目jar上传到私服供其他项目组使用. 开启Nexus服务 ...

  9. metasploit-post模块信息

    Name                                             Disclosure Date  Rank    Description ----           ...

  10. ZOJ 2975 思维

    题意 给出一个矩形 问在其中存在多少子矩形 其四个角上的字母是一样的 一开始暴力写了一发 先枚举行数 再枚举两个列数 再向下枚举行数 判断能否 没有意外的超时了 后来想了想 当我们已经确定两个列数的时 ...