I want to check if .Net 2.0 or greater is installed on the machine. I want to check in a way that when newer versions are released the old code works. Registry check is ideal as the code is in C++.
This blog post should have all the information you need: http://blogs.msdn.com/b/astebner/archive/2007/11/29/6608419.aspx
I am assuming that you wanna check .net framework version while/before installing a software if thats the case why don't you consider NSIS installer. I can help you further if NSIS serves your purpose.
Reading your question quite literally, I would suggest a bootstrapper which does the check, and then launches your .Net app.
Why? Because if your .Net app relies on a specific .Net version (example 3.0), and there is only v2.0 installed on the machine, then your app will crash. If you have a native bootstrapper .exe then you can check the registry using the WinAPI (thousands of examples already exist for this), then launch your .Net app.
An alternative is to check with a bootstrapper that relies only on .Net 2.0 - that version is fairly ubiquitous these days, the chances of a correctly patched and updated machine not having it are fairly small (the chances are greater if it is a pre-WinXP machine). Later versions of the .Net framework are backward compatable with v2.0 (although i am unsure if the reduced nature of the 4.0 CP framework still makes it fully compatable with v2.0).
This detailed SO answer will tell you which registry keys you need to check.