Add the Command Prompt to the Windows Explorer Right-Click Menu

December 8th, 2007
Add the Command Prompt to the Windows Explorer Right-Click Menu

Do you know that a hidden option allows using “Command prompt” when you right click on a directory via the menu rather then running it from RUN.

Here’s is a cool registry trick that gets its going. But make sure you backup your registry before embarking on it. I’ll show you how it’s done step by step. But you can always use the ready made reg file at the bottom.

Step-By-Step Method:

Type regedit.exe into the Start\Run dialog, and then navigate to the following registry key:

HKEY_CLASSES_ROOT\Directory\shell

Now right click on “shell” and choose the New Key option:

Add the Command Prompt to the Windows Explorer Right Click Menu

Now name the key “CommandPrompt” then double-click on the default value. Change the text to “Command Prompt Here” as seen below.

Add the Command Prompt to the Windows Explorer Right Click Menu

Now right click on the new Command key and select New key, just as you done before. Name the new key Command as well, and then double-click the default value of that key. Set the text of that key to this:

cmd.exe /k cd %1

You can see what it should look like here:

Add the Command Prompt to the Windows Explorer Right Click Menu

Now when you right click on the folder, you should see this dialog:

Add the Command Prompt to the Windows Explorer Right Click Menu

That will open up a prompt like this:

Add the Command Prompt to the Windows Explorer Right Click Menu

Alternate method:

You can create a text file named something.reg, and insert this text into it:

Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\CommandPrompt]
@=”Command Prompt”
[HKEY_CLASSES_ROOT\Directory\shell\CommandPrompt\Command]
@=”cmd.exe /k cd %1″

After making the reg file just double click it and you’ll have the right click Command Prompt.

Another Alternate Method:

You can download the powertoy from Microsoft that provides the same functionality:

http://www.microsoft.com/windowsxp/pro/downloads/powertoys.asp

Pranjal




  1. December 9th, 2007 at 00:01 | #1

    I prefer using the power toy as it means that I do not have to change the registry

  2. December 9th, 2007 at 07:05 | #2

    Thanks for the tip, but it better to stay away from registries.

  3. December 9th, 2007 at 12:48 | #3

    Well its based on your preferences… I love to tweak the registry.. reinstalling windows is like daily for me because sometimes i end up bricking the registry. But this one is a very simple one.

  1. No trackbacks yet.
Blog Widget by LinkWithin