I have posted updated versions of the .NET Framework detection code that I have previously written about on my blog that now support detecting the install state of the .NET Framework 4 client and full products. In addition, I decided to create a new landing page that introduces the 2 versions of the sample code and provides usage information and download locations.
You can find the landing page at http://blogs.msdn.com/astebner/pages/9763379.aspx.
The downloads for the updated sample code are listed in this landing page. There will need to be some slight updates to this sample code when the final version of the .NET Framework 4 releases. I will keep this code up-to-date as needed in the future.