A similar question was asked here, but it was specific to .NET 3.5. Specifically, I\'m looking for the following:
See How to: Determine Which .NET Framework Versions Are Installed (MSDN).
MSDN proposes one function example that seems to do the job for version 1-4. According to the article, the method output is:
v2.0.50727 2.0.50727.4016 SP2
v3.0 3.0.30729.4037 SP2
v3.5 3.5.30729.01 SP1
v4
Client 4.0.30319
Full 4.0.30319
Note that for "versions 4.5 and later" there is another function.