Creating a Visual Studio aware console window
What good is findstr without a command prompt, and what good is a command prompt that is unaware of your development environment?
When you install Visual Studio 20xx, it adds a menu item for a “devenv” (my term, not Microsoft’s) command window. That’s great, but not terribly convenient. Terribly convenient but not particularly great is the “Open command window here” context menu item in the Windows Explorer. What we really need is a devenv window that we can launch from the Explorer context menu, like this:
You’ll need two files; A registry patch, and a batch file to massage the command window. The download link below contains the files for Visual Studio versions 2008-2013.
- Download and expand the archive.
- Right click on the appropriate reg file and select “merge”.
- Place the corresponding batch file somewhere in your default system path — windowssystem32 for example.
File contents are listed below. The Visual Studio 2010 files are shown; all others are identical except for VS version number.vs2010.bat
call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VCvcvarsall.bat" amd64
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOTDirectoryshellvs2010_shell] @="Open VS2010 env window here"
[HKEY_CLASSES_ROOTDirectoryshellvs2010_shellcommand] @="cmd.exe /s /k vs2010.bat "%V""
Download the archive via the link below.