The Windows Context Menu appears when you Right-Click an object, whether it’s the Desktop or a file. I’m sure you’ve used it. The problem is, it’s missing some very basic options! We’re going to change all of that: This Registry Hack is part of a series on hacking the Windows Context Menu.
Open The Command Prompt From The Right-Click Context Menu
I love the Command Prompt - it’s a geek’s best friend when it comes to doing something quick and easy! The problem is that, when I’m working in Windows Explorer and I need to run the Command Prompt from the current window, I have to opening a command prompt and then navigating to the folder I’m currently in - which is frequently quite a few folders deep!
There’s a quicker way to get there with a Registry Hack (and you know I love Registry Hacks!
) We can add an option to the right-click context menu that will open a command prompt window at your current location!
Example
Let’s say you wanted to open the Command Prompt in your My Documents folder, you would simply right-click and then choose to open a command prompt, which would open it at:
C:\Documents and Settings\Your User Account\My Documents
How To
Warning: Before you play in your Windows Registry, please read this important information on editing the Windows Registry.
Open the Registry Editor by hitting the Windows Key+R, typing regedit. Navigating to the following location:
HKEY_LOCAL_MACHINE/Software/
Classes/Folder/shell
Note: Within HKEY_LOCAL_MACHINE/Software/Classes, there is a key named .Folder - we want the key named “Folder” without the period before it.
Once you’re at the shell key, right-click it and select New->Key. Name this new key Command Prompt.

Next, in the right plane, double click the (Default) value and name it whatever text you want to appear when you right-click on a folder - name it something descriptive like: Open Command Prompt.
Now, right-click the newly created Command Prompt key and create another new key. Name this new key Command.

In the right plane, double click the (Default) value and enter the following into the Value Data field:
Cmd.exe /k pushd %L
You should end up with the following:

You can now exit the Registry, the new menu option will show up immediately!
Note: The option wont appear when you right-click on a file - it only shows up when you right-click on a folder.

Explanation
Here is an explanation of the value we entered:
Cmd.exe /k pushd %L
We’ll break it down into parts:
Cmd.exe
This makes the call to open the Windows Command Prompt.
/k
Usually, the Command Prompt exits after you issue a single command. This switch tells the Command Prompt that it isn’t being used to issue only a single command and to remain open.
pushd
Tells the Command Prompt to store the name of the current directory.
%L
Uses the name that was stored by the pushd command to start the Command Prompt at that location.
Start Slide Show with PicLens Lite
Racoon Mario Suggests You Read These Related Posts:
Windows Hacks: Improve The Context Menu, Part 1Windows Hacks: Improve The Context Menu, Part 3Windows Hacks: Improve The Context Menu, Part 2Windows Key + F1Registry Hack: Delete The My Recent Documents Icon From The Start Menu