Jasinski Technical Wiki


Home Page
All Pages

Quick Search
Advanced Search »

Contributor Links

Create a new Page
File Management
Your Profile

Other Wiki Sections



Command Prompt Entry in a Folder's Shortcut Menu

Modified on Thu, Jun 13, 2013, 12:11 PM by Administrator Categorized as Windows (OS, IE, IIS, and MSMQ), Windows Registry


It’s handy to have an entry in the Windows Explorer context menu which will enable you to open a Command Window and automatically navigate to that folder. Here's how to create a Command Prompt entry on the context menus for both folders and drives. Similarly, this procedure will also add a VS Command Prompt entry (not shown in the screen shot below).




  • Copy the following text into a text file and save it as C:\Data\VSCMD.BAT.

%comspec% /k ""C:\Program Files\Microsoft Visual Studio 8\VC\vcvarsall.bat"" x86
cmd.exe /k cd /d "%1"

  • Copy the following text into a text file and save it with a .REG file extension.

Windows Registry Editor Version 5.00

@="Command &Prompt"

@="cmd.exe /k \"cd /d %L\""

@="Command &Prompt"

@="cmd.exe /k \"cd /d %L\""

@="&VS Command Prompt"

@="C:\\Data\\vscmd.bat \"%1\""

  • Double-click the newly-created REG file to merge it into the Windows Registry. You should see the commands in the shortcut menu without having to reboot.

Windows 7

  • On Windows 7, in order to see the new Command Prompt entry in the context menu, you must hold down the Shift key when right-clicking the folder/drive.

ScrewTurn Wiki version Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2015, Patrick Jasinski.