Check which .NET Framework version is installed

本文将指导您使用命令行工具检查已安装的.NET Framework版本及服务包级别,包括从注册表中获取详细信息的方法,并提供了一系列.NET Framework版本的注册表键路径。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

his article will help you to know which .NET Framework version is installed from command line.

Check which .NET Framework version is installed from command line

 

dir %WINDIR%\Microsoft.Net\Framework\v*

 

dir %WINDIR%\Microsoft.Net\Framework\v* /O:-N /B


Use the registry information below to determine which version(s) and service pack level(s) of the Microsoft .NET Framework are installed. 
To do this, following the steps below:
  1. Click Start, type regedit in the Search programs and files box (click Run and type regedit in the Run Dialogbox in Windows XP), and then press Enter.
  2. In the Registry Editor, locate the Registry Key Name in the table below and check the value for the related .NET Framework.
     
     
    2525681


     
     
    .NET FrameworkService Pack LevelRegistry Key NameValue
    4 - ClientOriginal ReleaseHKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\ClientName: Install, Type:REG_DWORD, Data:1
      HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\ClientName: Version, Type: REG_SZ, Data:4.0.30319.0
    4 - FullOriginal ReleaseHKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\FullName: Install, Type:REG_DWORD, Data:1
      HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\FullName: Version, Type: REG_SZ, Data:4.0.30319.0
    3.5Original ReleaseHKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5Name: Install, Type:REG_DWORD, Data:1
      HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5Name: SP, Type:REG_DWORD, Data:0
    3.5Service Pack 1HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5Name: Install, Type:REG_DWORD, Data:1
      HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5Name: SP, Type:REG_DWORD, Data:1
    3.0Original ReleaseFollow the deployment and detection guidance in this document: http://msdn.microsoft.com/en-us/library/aa480173.aspx
      HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0Name: SP, Type:REG_DWORD, Data:0
    3.0Service Pack 1HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0Name: Install, Type:REG_DWORD, Data:1
      HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0Name: SP, Type:REG_DWORD, Data:1
    3.0Service Pack 2HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0Name: Install, Type:REG_DWORD, Data:1
      HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0Name: SP, Type:REG_DWORD, Data:2
    2.0Original ReleaseHKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP\v2.0.50727Name: Install, Type:REG_DWORD, Data:1
      HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP\v2.0.50727Name: SP, Type:REG_DWORD, Data:0
    2.0Service Pack 1HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP\v2.0.50727Name: Install, Type:REG_DWORD, Data:1
      HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP\v2.0.50727Name: SP, Type:REG_DWORD, Data:1
    2.0Service Pack 2HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP\v2.0.50727Name: Install, Type:REG_DWORD, Data:1
      HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP\v2.0.50727Name: SP, Type:REG_DWORD, Data:2
    1.1 (on 32-bit operating systems)Original ReleaseHKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v1.1.4322Name: Install, Type:REG_DWORD, Data:1
      HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v1.1.4322Name: SP, Type:REG_DWORD, Data:0
    1.1 (on 32-bit operating systems)Service Pack 1HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v1.1.4322Name: Install, Type:REG_DWORD, Data:1
    1.1 (on 64-bit operating systems)Original ReleaseHKLM\SOFTWARE\Wow6432Node\Microsoft\NET Framework Setup\NDP\v1.1.4322Name: Install, Type:REG_DWORD, Data:1
      HKLM\SOFTWARE\Wow6432Node\Microsoft\NET Framework Setup\NDP\v1.1.4322Name: SP, Type:REG_DWORD, Data:0
    1.1 (on 64-bit operating systems)Service Pack 1HKLM\SOFTWARE\Wow6432Node\Microsoft\NET Framework Setup\NDP\v1.1.4322Name: Install, Type:REG_DWORD, Data:1
      HKLM\SOFTWARE\Wow6432Node\Microsoft\NET Framework Setup\NDP\v1.1.4322Name: SP, Type:REG_DWORD, Data:1
    1.0 (on supported platforms except for Windows XP Media Center and Tablet PC)Original Release

    HKEY_LOCAL_MACHINE\Software\Microsoft\Active Setup\Installed Components\{78705f0d-e8db-4b2d-8193-982bdda15ecd} 

    Name: Version, Type: REG_SZ, Data:1.0.3705.0
    1.0 (on supported platforms except for Windows XP Media Center and Tablet PC)Service Pack 1

    HKEY_LOCAL_MACHINE\Software\Microsoft\Active Setup\Installed Components\{78705f0d-e8db-4b2d-8193-982bdda15ecd} 

    Name: Version, Type: REG_SZ, Data:1.0.3705.1
    1.0 (on supported platforms except for Windows XP Media Center and Tablet PC)Service Pack 2

    HKEY_LOCAL_MACHINE\Software\Microsoft\Active Setup\Installed Components\{78705f0d-e8db-4b2d-8193-982bdda15ecd} 

    Name: Version, Type: REG_SZ, Data:1.0.3705.2
    1.0 (on supported platforms except for Windows XP Media Center and Tablet PC)Service Pack 3

    HKEY_LOCAL_MACHINE\Software\Microsoft\Active Setup\Installed Components\{78705f0d-e8db-4b2d-8193-982bdda15ecd} 

    Name: Version, Type: REG_SZ, Data:1.0.3705.3
    1.0 (shipped with Windows XP Media Center 2002/2004 and Tablet PC 2004)Service Pack 2

    HKEY_LOCAL_MACHINE\Software\Microsoft\Active Setup\Installed Components\{FDC11A6F-17D1-48f9-9EA3-9051954BAA24} 

    Name: Version, Type: REG_SZ, Data:1.0.3705.2
    1.0 (shipped with Windows XP Media Center 2005 and Tablet PC 2005)Service Pack 3

    HKEY_LOCAL_MACHINE\Software\Microsoft\Active Setup\Installed Components\{FDC11A6F-17D1-48f9-9EA3-9051954BAA24} 

    Name: Version, Type: REG_SZ, Data:1.0.3705.3

Recommended Deployment Detection

To detect the existence of a specific .NET Framework version regardless of the Service Pack level, or to detect a service pack level or a later service pack level of the same .NET Framework version, use the registry information that is listed in the following table.

Click here to view or hide detailed information

Collapse imageReferences

For more information about the benefits of the .NET Framework, click the following article number to view the article in the Microsoft Knowledge Base:
829019 Benefits of the Microsoft .NET Framework

For more information about Microsoft’s currently supported products, visit the  Microsoft Product Support Lifecycle website.

For more information about the Windows registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Windows registry information for advanced users

转载于:https://www.cnblogs.com/itelite/p/3966810.html

### .NET Framework 2.0 的下载与安装指南 #### 下载准备 为了确保顺利安装.NET Framework 2.0,需确认计算机的操作系统满足最低配置需求。通常情况下,Windows XP SP2及以上版本支持该框架的部署[^1]。 #### 获取安装文件 访问微软官方网站或官方镜像站点寻找适用于目标系统的.NET Framework 2.0发行版链接。由于此版本较为陈旧,可能需要进入存档页面查找资源。下载过程中注意验证文件哈希值以保障安全性。 #### 执行安装过程 双击已下载的安装包启动向导,在阅读许可协议之后接受条款继续前进。按照提示完成设置选项的选择,比如指定安装路径等个性化参数设定。对于希望获得更好的本地化服务体验的用户来说,还可以额外考虑安装对应的中文语言包来增强易用性[^2]。 ```powershell # 使用PowerShell脚本自动检测并安装.NET Framework 2.0 (仅作示意用途) $dotNetVersion = "v2.0.50727" if (-not ([System.Environment]::Version.StartsWith($dotNetVersion))) { Write-Host ".NET Framework $dotNetVersion not detected, proceeding with installation..." Start-Process -FilePath "path_to_installer.exe" -Wait } else { Write-Host ".NET Framework $dotNetVersion is already installed." } ``` 请注意,随着技术进步以及安全更新的需求变化,建议评估是否真的有必要坚持使用如此早期的技术栈;如果项目允许的话,则应优先考虑迁移至更现代且受长期维护的支持环境之中。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值