To troubleshoot an installation, sometimes I just want a quick answer to what version of .NET is installed.
Is there a way to determine the .NET Framework version on
EDIT: my answer is irrelevant for the OP question (which was edited after I originally answered).
According to MSDN you can use the registry as well to check for installed versions.
In addition this site claims that there is a command line application called csc you can use - haven't tried it though, I use the registry way during installations I run.