I have installed two versions of the same program: Visual Studio. Both versions have devenv.exe as their executable. If I open the run dialog and type devenv, then Visual Studio 2012 opens.

I would like to differentiate the two in the run dialog.

  • run > devenv12 opens Visual Studio 2012
  • run > devenv10 opens Visual Studio 2010.

How can I differentiate between two identically named executable in the run dialog?

  • 3
    In case you were not aware, when you run an exe by shortname in the run bar, it will execute the instance that comes up first when the %PATH% env variable is evaluated, so the order of directories in your path (from left to right) will determine which one gets run. – Frank Thomas Mar 20 '15 at 18:18

Using your favorite text editor, create two .bat files in a directory that's on the system path that point to the different executables.


@echo off
C:\path\to\MSVS 2012\devenv.exe


@echo off
C:\path\to\MSVS 2010\devenv.exe

You should then be able to run VS 2010 or VS 2012 exactly as you've written in your question: devenv10 should open VS 2010; devenv12 should open VS 2012.

  1. You should be able to rename the applications as you want and they still should execute normally.

  2. Specify the full path to the file, e.g. "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe"

  3. Though not exactly what you ask for, you could create shortcuts to the files and set a keyboard shortcut for each, e.g. Crtl+Alt+0 and Crtl+Alt+2 for v. 2010 and 2012 respectively.

  • 1
    #1 is very dangerous, as it's impossible to know what sorts of, e.g., registry keys are constructed assuming the executable is named devenv.exe. – hBy2Py Mar 20 '15 at 18:01

Have you tried creating a new environment variable on your machine? You can do this by going to "Control Panel\All Control Panel Items\System", then click on "Advanced system settings" and go to "Environment Variables...".

Add a new variable named devenv10 with the path pointing to the executable of your VS2010. You can then launch VS2010 by running %devenv10%

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.