Up until today, in order to get the VS command line prompt I checked the "ProductDir" value in the "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\VC" registry key.

I noticed that this code won't necessarily do the job if I'm running on Windows 7 64 bit, since this key is not always accissible to all programs.

I started to read a little about "WOW64", registry redirection, and registry reflection, but to verify that I'm not doing some kludgy Quick & Dirty work I wanted to ask: Is there a C# code to get the full path to the VS command-line prompt which is not dependent on the Windows version (XP, Vista, Server, or Windows 7), and not depend on whether we're in 32bit or 64bit?

Thanks at Advanced