如何检测安装了哪些 .NET Framework 版本和服务包?

发布于 2024-12-14 12:00:09 字数 257 浏览 1 评论 0原文

此处提出了类似的问题,但是它特定于 .NET 3.5。具体来说,我正在寻找以下内容:

  1. 确定安装了哪些 .NET Framework 版本和服务包的正确方法是什么?
  2. 是否有可以使用的注册表项列表?
  3. 框架版本之间是否存在依赖关系?

A similar question was asked here, but it was specific to .NET 3.5. Specifically, I'm looking for the following:

  1. What is the correct way to determine which .NET Framework versions and service packs are installed?
  2. Is there a list of registry keys that can be used?
  3. Are there any dependencies between Framework versions?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(13

山川志 2024-12-21 12:00:09

注册表是 检测是否安装了特定版本的框架的官方方法

在此处输入图像描述

根据您要查找的框架版本,需要更改哪些注册表项:

Framework Version  Registry Key
------------------------------------------------------------------------------------------
1.0                HKLM\Software\Microsoft\.NETFramework\Policy\v1.0\3705 
1.1                HKLM\Software\Microsoft\NET Framework Setup\NDP\v1.1.4322\Install 
2.0                HKLM\Software\Microsoft\NET Framework Setup\NDP\v2.0.50727\Install 
3.0                HKLM\Software\Microsoft\NET Framework Setup\NDP\v3.0\Setup\InstallSuccess 
3.5                HKLM\Software\Microsoft\NET Framework Setup\NDP\v3.5\Install 
4.0 Client Profile HKLM\Software\Microsoft\NET Framework Setup\NDP\v4\Client\Install
4.0 Full Profile   HKLM\Software\Microsoft\NET Framework Setup\NDP\v4\Full\Install

通常您要查找:

"Install"=dword:00000001

.NET 1.0 除外,其中值是字符串 (REG_SZ),而不是数字 (REG_DWORD)。

确定服务包级别遵循类似的模式:

Framework Version  Registry Key
------------------------------------------------------------------------------------------
1.0                HKLM\Software\Microsoft\Active Setup\Installed Components\{78705f0d-e8db-4b2d-8193-982bdda15ecd}\Version 
1.0[1]             HKLM\Software\Microsoft\Active Setup\Installed Components\{FDC11A6F-17D1-48f9-9EA3-9051954BAA24}\Version 
1.1                HKLM\Software\Microsoft\NET Framework Setup\NDP\v1.1.4322\SP 
2.0                HKLM\Software\Microsoft\NET Framework Setup\NDP\v2.0.50727\SP 
3.0                HKLM\Software\Microsoft\NET Framework Setup\NDP\v3.0\SP 
3.5                HKLM\Software\Microsoft\NET Framework Setup\NDP\v3.5\SP 
4.0 Client Profile HKLM\Software\Microsoft\NET Framework Setup\NDP\v4\Client\Servicing
4.0 Full Profile   HKLM\Software\Microsoft\NET Framework Setup\NDP\v4\Full\Servicing

[1] Windows Media Center or Windows XP Tablet Edition

如您所见,如果您在 Windows Media Center 或 Windows XP Tablet Edition 上运行,则确定 .NET 1.0 的 SP 级别会发生变化。同样,.NET 1.0 使用字符串值,而所有其他值都使用 DWORD。

对于 .NET 1.0,这些键中任意一个的字符串值的格式为#,#,####,#。最后一个 # 是 Service Pack 级别。

虽然我没有明确要求这一点,但如果您想知道框架的确切版本号,您可以使用这些注册表项:

Framework Version  Registry Key
------------------------------------------------------------------------------------------
1.0                HKLM\Software\Microsoft\Active Setup\Installed Components\{78705f0d-e8db-4b2d-8193-982bdda15ecd}\Version 
1.0[1]             HKLM\Software\Microsoft\Active Setup\Installed Components\{FDC11A6F-17D1-48f9-9EA3-9051954BAA24}\Version 
1.1                HKLM\Software\Microsoft\NET Framework Setup\NDP\v1.1.4322 
2.0[2]             HKLM\Software\Microsoft\NET Framework Setup\NDP\v2.0.50727\Version 
2.0[3]             HKLM\Software\Microsoft\NET Framework Setup\NDP\v2.0.50727\Increment
3.0                HKLM\Software\Microsoft\NET Framework Setup\NDP\v3.0\Version 
3.5                HKLM\Software\Microsoft\NET Framework Setup\NDP\v3.5\Version 
4.0 Client Profile HKLM\Software\Microsoft\NET Framework Setup\NDP\v4\Version 
4.0 Full Profile   HKLM\Software\Microsoft\NET Framework Setup\NDP\v4\Version 

[1] Windows Media Center or Windows XP Tablet Edition
[2] .NET 2.0 SP1
[3] .NET 2.0 Original Release (RTM)

同样,.NET 1.0 使用字符串值,而所有其他值都使用 DWORD。

附加说明

  • 对于 .NET 1.0,这些键中任一键的字符串值的格式为 #,#,####,#。字符串的 #,#,#### 部分是框架版本。

  • 对于 .NET 1.1,我们使用注册表项本身的名称,它代表版本号。

  • 最后,如果您查看依赖项,会发现 .NET 3.0 向 .NET 2.0 添加了附加功能,因此 .NET 2.0 和 .NET 3.0 都必须评估为已安装,才能正确表明 .NET 3.0 已安装。同样,.NET 3.5 向 .NET 2.0 和 .NET 3.0 添加了附加功能,因此 .NET 2.0、.NET 3.0 和 .NET 3. 都应评估为已安装,以正确表示已安装 .NET 3.5。

  • .NET 4.0 安装新版本的 CLR(CLR 版本 4.0),它可以与 CLR 2.0 并行运行。

.NET 4.5 更新

如果安装了 .NET 4.5,则注册表中不会有 v4.5 项。相反,您必须检查 HKLM\Software\Microsoft\NET Framework Setup\NDP\v4\Full 键是否包含名为 Release 的值。如果存在此值,则安装 .NET 4.5,否则不安装。更多详细信息可以在此处此处

The registry is the official way to detect if a specific version of the Framework is installed.

enter image description here

Which registry keys are needed change depending on the Framework version you are looking for:

Framework Version  Registry Key
------------------------------------------------------------------------------------------
1.0                HKLM\Software\Microsoft\.NETFramework\Policy\v1.0\3705 
1.1                HKLM\Software\Microsoft\NET Framework Setup\NDP\v1.1.4322\Install 
2.0                HKLM\Software\Microsoft\NET Framework Setup\NDP\v2.0.50727\Install 
3.0                HKLM\Software\Microsoft\NET Framework Setup\NDP\v3.0\Setup\InstallSuccess 
3.5                HKLM\Software\Microsoft\NET Framework Setup\NDP\v3.5\Install 
4.0 Client Profile HKLM\Software\Microsoft\NET Framework Setup\NDP\v4\Client\Install
4.0 Full Profile   HKLM\Software\Microsoft\NET Framework Setup\NDP\v4\Full\Install

Generally you are looking for:

"Install"=dword:00000001

except for .NET 1.0, where the value is a string (REG_SZ) rather than a number (REG_DWORD).

Determining the service pack level follows a similar pattern:

Framework Version  Registry Key
------------------------------------------------------------------------------------------
1.0                HKLM\Software\Microsoft\Active Setup\Installed Components\{78705f0d-e8db-4b2d-8193-982bdda15ecd}\Version 
1.0[1]             HKLM\Software\Microsoft\Active Setup\Installed Components\{FDC11A6F-17D1-48f9-9EA3-9051954BAA24}\Version 
1.1                HKLM\Software\Microsoft\NET Framework Setup\NDP\v1.1.4322\SP 
2.0                HKLM\Software\Microsoft\NET Framework Setup\NDP\v2.0.50727\SP 
3.0                HKLM\Software\Microsoft\NET Framework Setup\NDP\v3.0\SP 
3.5                HKLM\Software\Microsoft\NET Framework Setup\NDP\v3.5\SP 
4.0 Client Profile HKLM\Software\Microsoft\NET Framework Setup\NDP\v4\Client\Servicing
4.0 Full Profile   HKLM\Software\Microsoft\NET Framework Setup\NDP\v4\Full\Servicing

[1] Windows Media Center or Windows XP Tablet Edition

As you can see, determining the SP level for .NET 1.0 changes if you are running on Windows Media Center or Windows XP Tablet Edition. Again, .NET 1.0 uses a string value while all of the others use a DWORD.

For .NET 1.0 the string value at either of these keys has a format of #,#,####,#. The last # is the Service Pack level.

While I didn't explicitly ask for this, if you want to know the exact version number of the Framework you would use these registry keys:

Framework Version  Registry Key
------------------------------------------------------------------------------------------
1.0                HKLM\Software\Microsoft\Active Setup\Installed Components\{78705f0d-e8db-4b2d-8193-982bdda15ecd}\Version 
1.0[1]             HKLM\Software\Microsoft\Active Setup\Installed Components\{FDC11A6F-17D1-48f9-9EA3-9051954BAA24}\Version 
1.1                HKLM\Software\Microsoft\NET Framework Setup\NDP\v1.1.4322 
2.0[2]             HKLM\Software\Microsoft\NET Framework Setup\NDP\v2.0.50727\Version 
2.0[3]             HKLM\Software\Microsoft\NET Framework Setup\NDP\v2.0.50727\Increment
3.0                HKLM\Software\Microsoft\NET Framework Setup\NDP\v3.0\Version 
3.5                HKLM\Software\Microsoft\NET Framework Setup\NDP\v3.5\Version 
4.0 Client Profile HKLM\Software\Microsoft\NET Framework Setup\NDP\v4\Version 
4.0 Full Profile   HKLM\Software\Microsoft\NET Framework Setup\NDP\v4\Version 

[1] Windows Media Center or Windows XP Tablet Edition
[2] .NET 2.0 SP1
[3] .NET 2.0 Original Release (RTM)

Again, .NET 1.0 uses a string value while all of the others use a DWORD.

Additional Notes

  • for .NET 1.0 the string value at either of these keys has a format of #,#,####,#. The #,#,#### portion of the string is the Framework version.

  • for .NET 1.1, we use the name of the registry key itself, which represents the version number.

  • Finally, if you look at dependencies, .NET 3.0 adds additional functionality to .NET 2.0 so both .NET 2.0 and .NET 3.0 must both evaulate as being installed to correctly say that .NET 3.0 is installed. Likewise, .NET 3.5 adds additional functionality to .NET 2.0 and .NET 3.0, so .NET 2.0, .NET 3.0, and .NET 3. should all evaluate to being installed to correctly say that .NET 3.5 is installed.

  • .NET 4.0 installs a new version of the CLR (CLR version 4.0) which can run side-by-side with CLR 2.0.

Update for .NET 4.5

There won't be a v4.5 key in the registry if .NET 4.5 is installed. Instead you have to check if the HKLM\Software\Microsoft\NET Framework Setup\NDP\v4\Full key contains a value called Release. If this value is present, .NET 4.5 is installed, otherwise it is not. More details can be found here and here.

国产ˉ祖宗 2024-12-21 12:00:09

以下知识库文章中有针对此问题的 Microsoft 官方答案:

文章 ID:318785 -最后一次审查:2008 年 11 月 7 日 - 修订版:20.1
如何确定安装了哪些版本的.NET Framework以及是否应用了服务包

不幸的是,它似乎不起作用,因为2.0目录中的mscorlib.dll版本有2.0版本,并且有即使安装了 3.5 SP1,3.0 或 3.5 目录中也没有 mscorlib.dll 版本...为什么 Microsoft 官方答案会如此误导?

There is an official Microsoft answer to this question at the following knowledge base article:

Article ID: 318785 - Last Review: November 7, 2008 - Revision: 20.1
How to determine which versions of the .NET Framework are installed and whether service packs have been applied

Unfortunately, it doesn't appear to work, because the mscorlib.dll version in the 2.0 directory has a 2.0 version, and there is no mscorlib.dll version in either the 3.0 or 3.5 directories even though 3.5 SP1 is installed ... why would the official Microsoft answer be so misinformed?

感情洁癖 2024-12-21 12:00:09

Framework 4 beta 安装到不同的注册表项。

using System;
using System.Collections.ObjectModel;
using Microsoft.Win32;

class Program
{
    static void Main(string[] args)
    {
        foreach(Version ver in InstalledDotNetVersions())
            Console.WriteLine(ver);

        Console.ReadKey();
    }


    public static Collection<Version> InstalledDotNetVersions()
    {
        Collection<Version> versions = new Collection<Version>();
        RegistryKey NDPKey = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\NET Framework Setup\NDP");
        if (NDPKey != null)
        {
            string[] subkeys = NDPKey.GetSubKeyNames();
            foreach (string subkey in subkeys)
            {
                GetDotNetVersion(NDPKey.OpenSubKey(subkey), subkey, versions);
                GetDotNetVersion(NDPKey.OpenSubKey(subkey).OpenSubKey("Client"), subkey, versions);
                GetDotNetVersion(NDPKey.OpenSubKey(subkey).OpenSubKey("Full"), subkey, versions);
            }
        }
        return versions;
    }

    private static void GetDotNetVersion(RegistryKey parentKey, string subVersionName, Collection<Version> versions)
    {
        if (parentKey != null)
        {
            string installed = Convert.ToString(parentKey.GetValue("Install"));
            if (installed == "1")
            {
                string version = Convert.ToString(parentKey.GetValue("Version"));
                if (string.IsNullOrEmpty(version))
                {
                    if (subVersionName.StartsWith("v"))
                        version = subVersionName.Substring(1);
                    else
                        version = subVersionName;
                }

                Version ver = new Version(version);

                if (!versions.Contains(ver))
                    versions.Add(ver);
            }
        }
    }
}

The Framework 4 beta installs to a differing registry key.

using System;
using System.Collections.ObjectModel;
using Microsoft.Win32;

class Program
{
    static void Main(string[] args)
    {
        foreach(Version ver in InstalledDotNetVersions())
            Console.WriteLine(ver);

        Console.ReadKey();
    }


    public static Collection<Version> InstalledDotNetVersions()
    {
        Collection<Version> versions = new Collection<Version>();
        RegistryKey NDPKey = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\NET Framework Setup\NDP");
        if (NDPKey != null)
        {
            string[] subkeys = NDPKey.GetSubKeyNames();
            foreach (string subkey in subkeys)
            {
                GetDotNetVersion(NDPKey.OpenSubKey(subkey), subkey, versions);
                GetDotNetVersion(NDPKey.OpenSubKey(subkey).OpenSubKey("Client"), subkey, versions);
                GetDotNetVersion(NDPKey.OpenSubKey(subkey).OpenSubKey("Full"), subkey, versions);
            }
        }
        return versions;
    }

    private static void GetDotNetVersion(RegistryKey parentKey, string subVersionName, Collection<Version> versions)
    {
        if (parentKey != null)
        {
            string installed = Convert.ToString(parentKey.GetValue("Install"));
            if (installed == "1")
            {
                string version = Convert.ToString(parentKey.GetValue("Version"));
                if (string.IsNullOrEmpty(version))
                {
                    if (subVersionName.StartsWith("v"))
                        version = subVersionName.Substring(1);
                    else
                        version = subVersionName;
                }

                Version ver = new Version(version);

                if (!versions.Contains(ver))
                    versions.Add(ver);
            }
        }
    }
}
双马尾 2024-12-21 12:00:09

我想检测我的系统上是否安装了 .NET 版本 4.5.2,但我没有找到比 ASoft 更好的解决方案.NET 版本检测器

显示不同 .NET 版本的此工具的快照:

显示不同 .NET 版本的此工具的快照

I wanted to detect for the presence of .NET version 4.5.2 installed on my system, and I found no better solution than ASoft .NET Version Detector.

Snapshot of this tool showing different .NET versions:

Snapshot of this tool showing different .NET versions

我早已燃尽 2024-12-21 12:00:09

枚举 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP 的子项。每个子项都是 .NET 版本。如果它存在于计算机上,它应该具有 Install=1 值、显示服务包的 SP 值和 MSI=1 值(如果它是使用 MSI 安装的)。 (例如,Windows Vista 上的 .NET 2.0 没有最后一个,因为它是操作系统的一部分。)

Enumerate the subkeys of HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP. Each subkey is a .NET version. It should have Install=1 value if it's present on the machine, an SP value that shows the service pack and an MSI=1 value if it was installed using an MSI. (.NET 2.0 on Windows Vista doesn't have the last one for example, as it is part of the OS.)

时光病人 2024-12-21 12:00:09

对于 64 位操作系统,路径为:

HKEY_LOCAL_MACHINE\SOFTWARE\wow6432Node\Microsoft\NET Framework Setup\NDP\

For a 64-bit OS, the path would be:

HKEY_LOCAL_MACHINE\SOFTWARE\wow6432Node\Microsoft\NET Framework Setup\NDP\
も让我眼熟你 2024-12-21 12:00:09

.NET 4.5.1 更新

现在 .NET 4.5.1 已可用,需要检查注册表中名为 Release 的项的实际值,而不仅仅是其是否存在。值 378758 表示已安装 .NET Framework 4.5.1。但是,正如此处所述,该值为 378675在 Windows 8.1 上。

Update for .NET 4.5.1

Now that .NET 4.5.1 is available the actual value of the key named Release in the registry needs to be checked, not just its existence. A value of 378758 means that .NET Framework 4.5.1 is installed. However, as described here this value is 378675 on Windows 8.1.

放飞的风筝 2024-12-21 12:00:09

有一个可用的 GUI 工具,ASoft .NET 版本检测器,它一直被证明是高度可靠的。它可以通过在命令行上指定 XML 输出的文件名来创建 XML 文件。

您可以将其用于自动化。它是一个小程序,用非 .NET 相关语言编写,不需要安装。

There is a GUI tool available, ASoft .NET Version Detector, which has always proven highly reliable. It can create XML files by specifying the file name of the XML output on the command line.

You could use this for automation. It is a tiny program, written in a non-.NET dependent language and does not require installation.

笑,眼淚并存 2024-12-21 12:00:09

我需要找出我的计算机上安装的 .NET Framework 版本,我所做的就是转到控制面板并选择“卸载程序”选项。之后,我按名称对程序进行排序,找到了 Microsoft .NET Framework 4 Client Profile。

I was needing to find out just which version of .NET framework I had on my computer, and all I did was go to the control panel and select the "Uninstall a Program" option. After that, I sorted the programs by name, and found Microsoft .NET Framework 4 Client Profile.

深海蓝天 2024-12-21 12:00:09

这是一个用于获取已安装的.NET框架版本的PowerShell脚本,

function Get-KeyPropertyValue($key, $property)
{
    if($key.Property -contains $property)
    {
        Get-ItemProperty $key.PSPath -name $property | select -expand $property
    }
}

function Get-VersionName($key)
{
   $name = Get-KeyPropertyValue $key Version
   $sp = Get-KeyPropertyValue $key SP
   $install = Get-KeyPropertyValue $key Install
   if($sp)
   {
        "$($_.PSChildName) $name SP $sp"
   }
   else{
    "$($_.PSChildName) $name"
   }
}

function Get-FrameworkVersion{
   dir "hklm:\SOFTWARE\Microsoft\NET Framework Setup\NDP\" |? {$_.PSChildName -like "v*"} |%{
    if( $_.Property -contains "Version")
    {
        Get-VersionName $_
    }
    else{
        $parent = $_
        Get-ChildItem $_.PSPath |%{
            $versionName = Get-VersionName $_
            "$($parent.PSChildName) $versionName"
            }
        }
    }
}


$v4Directory = "hklm:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full"
if(Test-Path $v4Directory)
{
    $v4 = Get-Item $v4Directory
    $version = Get-KeyPropertyValue $v4 Release
    switch($version){
        378389 {".NET Framework 4.5"; break;}
        378675 {".NET Framework 4.5.1 installed with Windows 8.1 or Windows Server 2012 R2"; break;}
        378758 {".NET Framework 4.5.1 installed on Windows 8, Windows 7 SP1, or Windows Vista SP2"; break;}
        379893 {".NET Framework 4.5.2"; break;}
        { 393295, 393297 -contains $_} {".NET Framework 4.6"; break;}
        { 394254, 394271 -contains $_} {".NET Framework 4.6.1"; break;}
        { 394802, 394806 -contains $_} {".NET Framework 4.6.2"; break; }
    }
}

它是基于如何:确定安装了哪些 .NET Framework 版本。请使用 Get-FrameworkVersion() 函数获取有关已安装的 .NET Framework 版本的信息。

Here is a PowerShell script to obtain installed .NET framework versions

function Get-KeyPropertyValue($key, $property)
{
    if($key.Property -contains $property)
    {
        Get-ItemProperty $key.PSPath -name $property | select -expand $property
    }
}

function Get-VersionName($key)
{
   $name = Get-KeyPropertyValue $key Version
   $sp = Get-KeyPropertyValue $key SP
   $install = Get-KeyPropertyValue $key Install
   if($sp)
   {
        "$($_.PSChildName) $name SP $sp"
   }
   else{
    "$($_.PSChildName) $name"
   }
}

function Get-FrameworkVersion{
   dir "hklm:\SOFTWARE\Microsoft\NET Framework Setup\NDP\" |? {$_.PSChildName -like "v*"} |%{
    if( $_.Property -contains "Version")
    {
        Get-VersionName $_
    }
    else{
        $parent = $_
        Get-ChildItem $_.PSPath |%{
            $versionName = Get-VersionName $_
            "$($parent.PSChildName) $versionName"
            }
        }
    }
}


$v4Directory = "hklm:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full"
if(Test-Path $v4Directory)
{
    $v4 = Get-Item $v4Directory
    $version = Get-KeyPropertyValue $v4 Release
    switch($version){
        378389 {".NET Framework 4.5"; break;}
        378675 {".NET Framework 4.5.1 installed with Windows 8.1 or Windows Server 2012 R2"; break;}
        378758 {".NET Framework 4.5.1 installed on Windows 8, Windows 7 SP1, or Windows Vista SP2"; break;}
        379893 {".NET Framework 4.5.2"; break;}
        { 393295, 393297 -contains $_} {".NET Framework 4.6"; break;}
        { 394254, 394271 -contains $_} {".NET Framework 4.6.1"; break;}
        { 394802, 394806 -contains $_} {".NET Framework 4.6.2"; break; }
    }
}

It was written based on How to: Determine Which .NET Framework Versions Are Installed. Please use THE Get-FrameworkVersion() function to get information about installed .NET framework versions.

新雨望断虹 2024-12-21 12:00:09

使用 Signum.Utilities 库="http://www.signumframework.com" rel="nofollow noreferrer">SignumFramework(您可以独立使用),您可以很好地得到它,而无需自己处理注册表:

AboutTools.FrameworkVersions().ToConsole();
//Writes in my machine:
//v2.0.50727 SP2
//v3.0 SP2
//v3.5 SP1

Using the Signum.Utilities library from SignumFramework (which you can use stand-alone), you can get it nicely and without dealing with the registry by yourself:

AboutTools.FrameworkVersions().ToConsole();
//Writes in my machine:
//v2.0.50727 SP2
//v3.0 SP2
//v3.5 SP1
芯好空 2024-12-21 12:00:09

请参阅如何:确定安装了哪些 .NET Framework 版本 (MSDN)。

MSDN 提出了一个函数示例,似乎可以完成版本 1-4 的工作。根据该文章,该方法的输出为:

v2.0.50727  2.0.50727.4016  SP2
v3.0  3.0.30729.4037  SP2
v3.5  3.5.30729.01  SP1
v4
  Client  4.0.30319
  Full  4.0.30319

请注意,对于“4.5 及更高版本”,还有另一个函数。

See How to: Determine Which .NET Framework Versions Are Installed (MSDN).

MSDN proposes one function example that seems to do the job for version 1-4. According to the article, the method output is:

v2.0.50727  2.0.50727.4016  SP2
v3.0  3.0.30729.4037  SP2
v3.5  3.5.30729.01  SP1
v4
  Client  4.0.30319
  Full  4.0.30319

Note that for "versions 4.5 and later" there is another function.

二手情话 2024-12-21 12:00:09

在 Windows 7 中(它也应该适用于 Windows 8,但我还没有测试过):

转到命令提示符

转到命令提示符的步骤:

  1. 单击“开始”菜单
  2. 在搜索框中,键入“cmd”(不带引号)
  3. 打开 cmd.exe

在 cmd 中,键入此命令

wmic /namespace:\\root\cimv2 path win32_product where "name like '%%.NET%%'" get version

这将提供安装的 NET Framework 的最新版本。

也可以尝试 Raymond.cc 实用程序 同样如此。

In Windows 7 (it should work for Windows 8 also, but I haven't tested it):

Go to a command prompt

Steps to go to a command prompt:

  1. Click Start Menu
  2. In Search Box, type "cmd" (without quotes)
  3. Open cmd.exe

In cmd, type this command

wmic /namespace:\\root\cimv2 path win32_product where "name like '%%.NET%%'" get version

This gives the latest version of NET Framework installed.

One can also try Raymond.cc Utilties for the same.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文