Find Dot Net Frameworks on Win32 PC using C++

11/12/2010 Update
Added support for 4.0 Framework.
Updated code sample (VS 2010) can be found here:
Compiled exe only can be found here:

Original Information
I had a request to find what current dot net frameworks are  installed on a given PC (Win 32). I found an example in C++ here:

C++ source code is here for the above example:

I modified the code above to return the results to the command line. The original code displays the results in a message box for each framework.

If you want to test just the exe file, you can download it here:


The full C++ source code is here (I used VS 2008):

From the command line type “CheckDotNetInstall false” to  get results in the command window, as shown below:

Running CheckDotNetInstall with no parameters will display a message box for each framework. This is changed in the new version, no message prompts are displayed. The code would need to be modified to change this behavior, please see header text of main code module for details.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.