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. POJ2441 Arrange the Bulls(状压DP)

    题目是,有n头牛,每头牛都喜爱某几个草地,要把这n头牛分配给m个不同的它们喜爱的草地,问有几种分配方式. dp[n][S]表示前n头牛分配完毕后占用的草地集合是S的方案数 dp[0][0]=1 dp[ ...

  2. HDU1561 The more, The Better(树形DP)

    题目是有n个存有宝藏的城堡,攻克任何一个城堡都需要先攻克0个或其他1个城堡,问攻克m个城堡最多能得到多少宝藏. 题目给的城堡形成一个森林,添加一个超级根把森林连在一起就是树了,那么就考虑用树型DP: ...

  3. BZOJ3925: [Zjoi2015]地震后的幻想乡

    Description 傲娇少女幽香是一个很萌很萌的妹子,而且她非常非常地有爱心,很喜欢为幻想乡的人们做一些自己力所能及的事情来帮助他们. 这不,幻想乡突然发生了地震,所有的道路都崩塌了.现在的首要任 ...

  4. Ubuntu根目录下各文件夹的功能详细介绍

    Ubuntu的根目录下存在着很多的文件夹,但你知道他们都存放着哪些文件呢?这些是深入了解Ubuntu系统必不缺少的知识,本文就关于此做一下介绍吧. /bin/    用以存储二进制可执行命令文件. / ...

  5. PHP 如何读取一个1G的文件大小

    需求如下: 现有一个1G左右的日志文件,大约有500多万行, 用php返回最后几行的内容. 1. 直接采用file函数来操作 or file_get_content() 肯定报内存溢出注: 由于 fi ...

  6. 将textField编辑完内容作为参数发送请求

    将textField编辑完内容作为参数发送请求  首先赋值默认值  其次把编辑完的内容传给model,这样的话,model里面的数据就是编辑完之后的内容了

  7. iOS开发项目之一 [ 项目流程]

    项目流程 *人员配置 *客户端(iOS工程师,Android工程师) *前端 h5 *后台人员(php,java,net) *提供接口(请求地址.请求参数,请求方式,接口文档) *UI UE * 效果 ...

  8. Css - Table.css

    基本的Table样式 .gridtable { border: solid #ccc 1px; -moz-border-radius: 6px; -webkit-border-radius: 6px; ...

  9. 用Editplus开发HTML

    准备工作 设置Editplus默认的打开浏览器为系统默认浏览器 取消Editplus的临时缓存文件 ☆ 设置不生成临时文件 这里的临时文件,指的是.bak文件,当你在Editplus下修改任意一个文件 ...

  10. MyBatis+springMVC+easyUI (dataGirl)实现分页

    页面展示效果. 页面代码: <%@ page contentType="text/html;charset=UTF-8" language="java"  ...