Where is Visual Studio 2005 installed?

C:\>reg query HKLM\SOFTWARE\Microsoft\VisualStudio\8.0\Setup\VS /v EnvironmentDirectory



    EnvironmentDirectory REG_SZ  C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\

It's unfortunately not simple (although certainly still doable) to get that path parsed out to "cd" to it with cmd.exe as-is (note that we had to invoke a separate exe in the above).  However, if you're using Monad, you can just get-property with the registry provider, already built-in to Monad.

MSH C:\> $(gp HKLM:\Software\Microsoft\VisualStudio\8.0\Setup\VS).EnvironmentDirectory

C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\

MSH C:\> cd $($(gp HKLM:\Software\Microsoft\VisualStudio\8.0\Setup\VS).EnvironmentDirectory)

MSH C:\Program Files\Microsoft Visual Studio 8\Common7\IDE>