Registry keys for the .NET Framework start like this:
HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP\
Depending on the version, the rest of the key will be different (check this page).
You can look up how to access the registry in MSDN article Using the registry in a C++ application.