How to check if the framework is installed in the correct version?

2

Requirements to install the main software: .Net Framework 4.5.1 Service Pack 1 In other words, I am creating a download manager that downloads the correct version of the main software (32 or 64 bits) and the manager himself scans the client machine updating if necessary the above requirements. But I'm having trouble checking if the framework is installed. Another doubt, could this software be only executable without the client having to install on his machine?

    
asked by anonymous 25.09.2016 / 19:13

1 answer

2

Felipe, the version of .Net is registered in a registry key. Starting with .Net 4.5, it is registered in the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full fa key in the release subkey.

You then check if the framework is in the desired version by using the registry key classes, checking to see if the key exists and if the subkey is above the minimum value.

This link from Microsoft gives you the best information on how to identify the version and purchase the version using C #: link

    
26.09.2016 / 01:47