Featured Posts

Tools I use Visual Studio Addins 1. GhostDoc This is a free addin that automatically generates the XML comments for your code. Click on the method/field name and press Control + Shift + D and it generates the XML...

Readmore

New UI for my website! Hello, I have modified the UI of my website and have moved all my blogs from my old blog site. There were few comments from my site visitors and friends that site was not rendering properly in Google Chrome...

Readmore

Setting custom toolwindow icon for Visual Studio add-in I recently completed a minor update to my Favorites Menu for Visual Studio add-in. The new installer is already put under ‘My Development’ section on my site. The update includes a minor bug fix...

Readmore

Set devenv to run your Visual Studio version 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...

Readmore

  • Prev
  • Next

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.

Write a comment