Subscribe to How-To Geek

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

A hidden functionality in Windows allows you to right click on a directory, and select “Command Prompt Here” from the menu.

Here’s the registry hack to get this working. Make sure you back up your registry just in case. I’ll show you the step-by-step method, but you can skip down to the bottom for the alternate reg file.

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

Once you are at that key, right click and choose the New Key option:

Name the key “CommandPrompt” without the quotes and then double-click on the default value. Change the text to “Command Prompt Here” as seen here:

Right click on the new Command key and select New key, as you did 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:

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

That will open up a prompt like this:

 

Alternate method:

You can create a text file named anything.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″

Double click on that file, and the text will be entered into the registry, and you’ll have the same 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

| More
This article was originally written on 11/25/06 Tagged with: Command Line, Customizing: Tips & Tweaks, Windows

Daily Email Updates

You can get our how-to articles in your inbox each day for free. Just enter your name and email below:


Name:
Email:

Comments (10)

  1. Krishma Sood

    Nice and easy to implement..

  2. Mario

    Very nice, very useful!

  3. Alex Anderson

    Thanks a lot. It’s a great idea.

  4. Shaunette

    Do I follow the same procedure to undo this? Please help….

  5. manish

    hey Man

    to good really i am damn impressed god work man.and its availabe for us.
    thanks a ton :)

    hope you will continue like this

    take care

    Manish

  6. lliz0

    Great idea!!! Thanks for sharing the trick man

    take care

  7. Ionatan

    Hi, I had this a while ago, but completly lost how to do it. Here is a fix to make it work with folders with an & in its name:

    cmd.exe /k cd %1

  8. Thomas

    Just a comment on the reg code posted under “Alternate Method:”.

    The last quotation is unicode…If you copy-paste into a .reg file, it’ll warn you about saving unicode.
    Looking at the file, that last quotation is replaced with a question mark.
    If you just change it back to a regular quotation, it works fine.

    Not sure if this affects anyone else…Just thought I’d mention it.

  9. Chol

    does this need system to be restart? it is not on my computer

  10. Chol

    it is not working on my computer


Leave a Comment




Leave your friendly comment here.

If you have a computer help question, click here to leave it on the forums instead.

Note: Your comment may not show up immediately on the site.

Our Friends
Getting Started


About How-To Geek
What Is That Process?
svchost.exe
jusched.exe
dwm.exe
ctfmon.exe
wmpnetwk.exe
mDNSResponder.exe
wmpnscfg.exe
rundll32.exe
wfcrun32.exe
Ipoint.exe
Itype.exe
Wfica32.exe
Mobsync.exe
conhost.exe
Dpupdchk.exe Adobe_Updater.exe

Copyright © 2006-2009 HowToGeek.com. All Rights Reserved.