Get the machine installed. NET version in several ways

Source: Internet
Author: User

Original: Get machine installed. NET version in several ways

When investigating application problems, it is often necessary to first confirm the version of the. NET Framework installed on the target machine. The version number can be confirmed in the following way:

    • Querying through the Control Panel installer
    • Get version information by querying the registry
    • Get version information by viewing the installation directory
    • Get version information by using WMI commands
Querying through the Control Panel installer

Get version information by querying the registry

To find the key in registry regedit:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\ndp\v4\full

The following results are obtained:

The corresponding results are as follows:

Value of the Release

Version

378389

. NET Framework 4.5

378675

. NET Framework 4.5.1 installed with Windows 8.1

378758

. NET Framework 4.5.1 installed on Windows 8, Windows 7 SP1

379893

. NET Framework 4.5.2

Get version information by viewing the installation directory

Typically, the. NET Framework is installed in:

%windir%\Microsoft.NET\Framework

And the corresponding results are usually:

C:\Windows\Microsoft.NET\Framework

Use the command:

Dir%windir%\microsoft.net\framework\v*/b

Get directory results:

However, this lists only the directories, it is not possible to determine whether. NET 4.5 or. NET 4.5.1 are installed, and you need to view the DLL version details directly.

For example, in the view of the mscorlib.dll version number is 4.0.30319.34209, what does this mean?

    • 4.0.30319.1 =. NET 4.0 RTM
    • 4.0.30319.269 = most common. NET 4.0 version
    • 4.0.30319.544 = another. NET 4.0 version that a small portion
    • 4.0.30319.17626 =. NET 4.5 RC
    • 4.0.30319.17929 =. NET 4.5 RTM
    • 4.0.30319.18010 = Current version on my Windows 8 machine
    • 4.0.30319.18052 =. NET 4.5 on Windows 7 SP1 64-bit
    • 4.0.30319.18408 =. NET 4.5.1 on Windows 7 SP1 64-bit
    • 4.0.30319.34209 =. NET 4.5.2 on Windows 7 PS1 64-bit
    • 4.0.30319.34014 =. NET 4.5.1 on Windows 8.1 64-bit
    • 4.0.30319.34209 =. NET 4.5.2 on Windows 8.1 64-bit
Get version information by using WMI commands

You can get the version number by executing the WMIC command, which is the following command:

WMIC product where "name like ' Microsoft. net% '" Get Name, Version

Execution Result:

The WMIC command can also be used to query all. NET-related Microsoft applications installed on the target machine, with the following commands:

wmic/namespace:\\root\cimv2 path Win32_Product where "name like '%%.net%% '" Get Name, Version

Execution Result:

Resources
    • . NET SDKs and Downloads
    • How To:determine which. NET Framework Versions is installed
    • How To:determine which. NET Framework Updates is installed

This article, "Obtaining machine installation." NET version of the several ways "by Dennis Gao published from the blog Park, without the author's consent to prohibit any form of reproduction, any automatic or artificial crawler reproduction behavior are bullying.

Get the machine installed. NET version in several ways

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.