Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change "devenv" command location?

I have two versions of Visual Studio 2005/208 installed in my system (windows7), when I am opening Visual Studio with "devenv" command from "Run" window then its opening Visual Studio 2005 but I want when I open it using "devenv" command so Visual Studio 2008 should open by default.

How can I do this in windows.

Thanks

Note: I am not sure this question is for Stackoverflow or for Superuser so just asked it here, if this has any problem then (any moderator) please move it to superuser.

like image 574
djmzfKnm Avatar asked Dec 12 '09 12:12

djmzfKnm


1 Answers

You can follow these steps to open VS2008 from the command prompt using "devenv":

  1. Open the Registry Editor by typing regedit on Run

  2. Locate and open the following key:

    My Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\devenv.exe
    
  3. Currently for VS 2005, devenv.exe is mapped to

    C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.exe
    

    If you want open VS 2008 from the command prompt, you must change the map to

    C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe
    

    Just change to 8 to 9.0 to switch from VS 2005 to VS 2008, or VS 2008 to VS 2005.

like image 122
Prasad Kanaparthi Avatar answered Oct 06 '22 01:10

Prasad Kanaparthi