Set devenv to run your Visual Studio version
Posted on : 09-09-2009 | By : Utkarsh Shigihalli | In : .net, development
0
Recently I found out that my wife has VS 2003, VS 2005 and VS 2008 all installed in her laptop. It is our usual practice that we hit devenv in Windows run menu to open our Visual Studio IDE. So whenever my wife hit devenv in run window, it always opened VS 2003 editor, where as she wanted it to open VS 2005.
I just now found out how to change this behavior. Windows run menu works by identifying the commands in the particular registry entry.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths
The devenv.exe, and its path is defined in that registry key.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\devenv.exe
So when you install VS 2005/2008 and then install VS 2003, this registry key is overwritten.
So you can rewrite this path of devenv.exe to set the proper behavior.
Default path to Visual Studio 2005:
C:\Program Files\Microsoft Visual Studio 8.0\Common7\IDE\devenv.exe
Default path to Visual Studio 2008:
C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe
Disclaimer: Modifying the registry can cause serious problems that may require you to reinstall your operating system. Use the information provided at your own risk.



