Introduction

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 target's computer. This article manages the rare (but possible) situation if there aren't any .NET Frameworks installed. For this purpose, it starts with a pure C++ application (Starter) that doesn't need any .NET components in order to check whether at least anyone .NET Framework is available. If yes, the main application starts and shows a GUI with located components. Now the user has a possibility, to select a directory to check all *.EXEs, *.DLLs and *.OCXs in it for fulfillment of .NET requirements.

Background

To get an accurate list of the .NET Framework versions installed on a computer, we need to view the registry. This feature is accompanied by Microsoft's document here. To find the .NET Framework 1 - 4, we need to use the following subkey:

On running provided CheckDotNet.exe in this article on windows-7 machine with no other applications except Win-7 OS.
I got different error than expected one which you had mentioned in this article

To run this application, you first must install one of the following versions of the .NET Framework:
v4.0.30319
Contact your application publisher for instructions about obtaining the appropriate version of the .NET Framework.

could you please provide some help on verifying that my windows machine is installed/not installed to have .NET framework. If not I have to prompt user to do so.

Thank you for your tool.
I have 2 remarks:
- black font on red background is not so good (yellow on red is much better IMHO);
- information like "some version with/without some updates" has tinge of incompleteness; IMHO it should be augmented with information about the latest available update.

However, for the detection your code still does not "shows".Net 4.6.2 onwards, as in GetDotNet the

if (bNetfx462Installed)
{
}

onwards is empty/missing.

However, I'm not quite shure if the concept how you use it works that way for .Net 4.5 onwards:
It tells all is installed based on actual installed .Net, so if it is 4.7.2 Instaled, all lower, up to 4.5, are also installed?
Right?
Why not code it that way then, meaning get 4.5 Regkey version and then list all lower versions as installed?

But for really finding out which versions are installed I've not investigated how to.

Maybe one of those methos can reveal this (hard for me to test as I have a lot of Core/SDK's installed).

Thank you for explaining how this all works; it is very complex just to get the different versions.
You would think that Microsoft would have made it more simple instead of this mess of registry keys.

Just FYI; I have been using a tool called .net version detector from asoft.be.
It already exists for a long time and very useful and uptodate.
You can also download frameworks/sdk's and export the data in text and xml to analyze.

thank you for feedback! I have took a look at ASoft .NET Version Detector product details[^] - this is a very useful tool as well.
But (as wrote at the beginning of article) there may be a rare but possible case, you don't have any .NET Framework on your system. In this case the ASoft tool will not run.
In contrast, the .NET Framework Checker can handle this case due to Win32_Loader!
You start with Win32_Loader, it try to determine at least everyone .NET component and starts the main GUI App, but if not - it shows the MessageBox and you know what to do

First, thanks for your explanations and tool
I saw your 16.08.2018 update in the code for versions 4.7.1 and 4.7.2
My installed version is 461310. However the checker only displays up to 4.6.1, and not 4.7.1.
I guess the reason of the failure is that the const GDwNetfx471ReleaseVersion is not (yet) used in your code.