All posts tagged 'vs2008'

.NET Musings

Wandering thoughts of a developer, architect, speaker, and trainer

NAVIGATION - SEARCH

Command Prompt And Visual Studio Command Prompt Here

How many times do you right click in Windows Explorer wanting a command prompt?  Vista users, there is a hidden nugget that works: Shift-Right Click on a folder in the right pane and you have the option to get a command prompt in that folder. Thanks to Andre Burgaud's blog for this tip.

I like using Console2 instead of the default Windows Command window, so I modified the registry file supplied by Andre a bit:

Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\CommandPrompt]
@="Console Window Here"
[HKEY_CLASSES_ROOT\Directory\shell\CommandPrompt\command]
@="c:\\utilities\\console2\\console.exe /d pushd %L"

pushd pushes the current directory onto the stack, and %L uses that directory's name.

Extending this for .Net developers, you can change it to add the "Visual Studio Command Prompt" by adding the vsvarsall.bat command:

Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\VSCommandPrompt]
@="Visual Studio Console Window Here"
[HKEY_CLASSES_ROOT\Directory\shell\VSCommandPrompt\command]
@="cmd.exe /k \"\"C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\vcvarsall.bat\"\" x86 && pushD %L"

The cmd.exe line must all be on one line in your file (change here for formatting purposes).


Happy coding!

Managed Windows Shared Hosting by OrcsWeb