Jasinski Technical Wiki

Navigation

Home Page
Index
All Pages

Quick Search
»
Advanced Search »

Contributor Links

Create a new Page
Administration
File Management
Login/Logout
Your Profile

Other Wiki Sections

Software

PoweredBy

Page History: Command Prompt Entry in a Folder's Shortcut Menu

Compare Page Revisions



« Older Revision - Back to Page History - Newer Revision »


Page Revision: Mon, Nov 23, 2009, 10:21 AM


Overview

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).

Image

Image

Procedure

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

{copytext|vscmd}
%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.

{copytext|registry}
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\shell\cmd]
@="Command &Prompt"

[HKEY_CLASSES_ROOT\Directory\shell\cmd\command]
@="cmd.exe /k \"cd %L\""

[HKEY_CLASSES_ROOT\Drive\shell\cmd]
@="Command &Prompt"

[HKEY_CLASSES_ROOT\Drive\shell\cmd\command]
@="cmd.exe /k \"cd %L\""

[HKEY_CLASSES_ROOT\Directory\shell\vscmd]
@="&VS Command Prompt"

[HKEY_CLASSES_ROOT\Directory\shell\vscmd\command]
@="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.

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