Users can install and run multiple versions of the .NET Framework on their computers. When you develop or deploy your app, you might need to know which .NET Framework versions are installed on the user’s computer.
To get an accurate list of the .NET Framework versions installed on a computer, you can view the registry or query the registry in code. Note that the .NET Framework consists of two main components, which are versioned separately:
To get an accurate list of the .NET Framework versions installed on a computer, you can view the registry or query the registry in code:
Read the full how to ‘determine Which .NET Framework Versions Are Installed’ on Docs.microsoft.com: How to: Determine Which .NET Framework Versions Are Installed
In PowerShell use the
Get-ItemProperty cmdlet to get the installed .NET version:
(Get-ItemProperty "HKLM:Software\Microsoft\NET Framework Setup\NDP\v4\Full").Version
About .NET Framework versions: Did you know you can use the
/clr parameter of AppCmd to target multiple ASP.NET CLR versions with AppCmd? CLR stands for Common Language Runtime. Pretty neat heh? :)
A registry can store different types of values in various formats. These Registry Value Types are listed here. When you store data under a registry value, for instance by calling the RegSetValueEx function, you can specify one of the following values to indicate the type of data being stored. When you retrieve a registry value, functions such as RegQueryValueEx use these values to indicate the type of data retrieved.
The following registry value types are defined in Winnt.h.
Read more at Microsoft MSDN Registry Value Types.
My name is Jan. I am not a hacker, coder, developer, programmer or guru. I am merely a system administrator, doing my daily thing at Vevida in the Netherlands. With over 15 years of experience, my specialties include Windows Server, IIS, Linux (CentOS, Debian), security, PHP, websites & optimization.
AppCmd introduction and examples
IIS application pool recycle on specific times, not regular time interval
Conditionally start Application Pools on remote IIS web servers
Custom PHP version on IIS Express and WebMatrix 3
Target multiple ASP.NET versions with AppCmd.exe
Multiple IIS 6.0/7.5 Vulnerabilities