I know there is a registry key indcating the install directory, but don't remember what it is off-hand.
Currently interested in VS2008 install directory, though it wouldn't hurt to list others for future reference.
I know there is a registry key indcating the install directory, but don't remember what it is off-hand.
Currently interested in VS2008 install directory, though it wouldn't hurt to list others for future reference.
I'm sure there's a registry entry as well but I couldn't easily locate it. There is the VS90COMNTOOLS environment variable that you could use as well.
Environment: Thanks to Zeb and Sam for the VS*COMNTOOLS
environment variable suggestion. To get to the IDE in PowerShell:
$vs = Join-Path $env:VS90COMNTOOLS '..\IDE\devenv.exe'
Registry: Looks like the registry location is HKLM\Software\Microsoft\VisualStudio
, with version-specific subkeys for each install. In PowerShell:
$vsRegPath = 'HKLM:\Software\Microsoft\VisualStudio\9.0'
$vs = (Get-ItemProperty $vsRegPath).InstallDir + 'devenv.exe'
[Adapted from here]
Aren't there environment settings? I have VCToolkitInstallDir
and VS71COMNTOOLS
although I'm using VS2003, I don't know if that changed for later versions. Type "set V" at the command line and see if you have them.
Use Environment.GetEnvironmentVariable("VS90COMNTOOLS");
also in 64 bit enviroment, it works for me.