Check if NETFramework v 4.x is installed

Mar 19, 2013 at 8:49 PM
Hi,

For your info, it seems that MS change the location to check if a Framework is installed for v4.x

You check like this:
// Check for required netfx installation
if (not RegKeyExists(HKLM, 'Software\Microsoft.NETFramework\AssemblyFolders\v3.5')) then

On MS Page http://msdn.microsoft.com/en-us/library/hh925568.aspx
"To find the installed version
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. Starting with the .NET Framework 4 the Version entry is under the Client or Full subkey (under NDP), or under both subkeys.

You can test whether the .NET Framework 4.5 or the .NET Framework 4 is installed by checking the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full subkey in the registry for a DWORD value named Release. The existence of this DWORD indicates that the .NET Framework 4.5 has been installed on that computer. The value of Release is a version number. To determine if the final release version of the .NET Framework 4.5 is installed, check for a value that is equal to or greater than 378389."

Thanks for the sample :)