I have already explained (very superficially) the motivation for the need of jumping directly into a directory from the Windows Explorer, while having the Visual Studio (VC++ actually) compiler and linker tools available for various architectures in my older post windows task: Open Visual C++ command prompt by right-clicking a folder.

I have now improved these methods, as it has become trickier to be able to compile software with Visual Studio 2008, 2010 and 2012 all in the same system.

Be advised that to use this method you will need Windows 7 and most likely Administrative rights also. I am using a registry feature that is not available on 2000, XP and Vista (as far as I know), so chances are you will need to tweak these scripts significantly to get a similar effect, but the principle idea of detecting what is installed on the system should be the same.

The script I wrote creates 2 Context Menus and one submenu entry for each Visual Studio Version available in your system. If a version of VS is not present an entry is not created. What you should see if you have all three versions of VS (2008, 2010, 2012), will be something like:

  • VS (32-bit), for 32-bit prompts.
    • VS2012 x86 Prompt
    • VS2010 x86 Prompt
    • VS2008 x86 Prompt
  • VS (64-bit), for 64-bit prompts.
    • VS2012 x64 Prompt
    • VS2010 x64 Prompt
    • VS2008 x64 Prompt

Right-clicking on a directory will show you something like this:

vsprompt-all-in-one

Feel free to download and use the batch file (vs-cmd-prompt-all-in-one.bat) that does all this.

You can find more information about creating Context Menu entries over at MS, see below in the References section, however be aware that the documentation is poor and some of the examples they are showing are both inconsistent as well as wrong.


Any feedback or bug reports are welcome.

References

0