"Command Prompt" in Windows Explorer Context Menu

There's a great power-toy for adding "Command Prompt" to the Windows Explorer context menu in XP here (or search for XP Power Toys). In Vista and Server 2008, you just hold shift when you right click to get it -- built in. But what if you're on Windows Server 2003 or another version? Well, the technique to add it is just a simple registry change:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\Command_Prompt]
@="Command Prompt"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\Command_Prompt\command]
@="cmd.exe /k pushd \"%1\""

Copy the above into a reg file (such as "Command Prompt Here.reg" -- no quotes) or similar, double-click to merge it, and you've got a Command Prompt selection in Windows Explorer's context menu. Easy as pie. If you want to "uninstall" it, open up RegEdit, navigate to that key, and delete it. Changes take effect imediately.

Note: some have reported this syntax brings up an error. If cmd.exe isn't in the PATH, this will utterly fail. In some cases I've had success with changing the command to be @="cmd.exe \"%1\"". In some cases, that utterly fails too. Your mileage may vary, batteries not included, don't use this product while sleeping on a curling iron or driving in traffic.

And to take it a step further, I modified the command name to "Command Prompt x86" and the command to "C:\Windows\SysWoW64\cmd.exe \"%1\"" and imported into a new key name, and I now have a 32-bit command prompt in the pop-up too.

(Now hopefully I won't forget it again.)

posted @ Thursday, May 14, 2009 12:02 PM

Print

Comments on this entry:

# re: "Command Prompt" in Windows Explorer Context Menu

Left by Rick at 8/13/2009 7:02 PM
Gravatar
This tip is all over the Internet. Here's a tougher question for you: how do you add it to the file (not folder) context menu? (Hint: yes, it's possible.)

# re: "Command Prompt" in Windows Explorer Context Menu

Left by casino giochi at 5/3/2010 2:59 AM
Gravatar
how to add right click for creating new folder at tree list (i.e. left column of explorer, similar to acdsee 2.4 / 3.0 that you can add folder at any visible folder, saving lots of clicks and stupid layered selection); accordingly how to add an icon at explorer to create folder? I'm using win98, me, 2000 and nt....

Your comment:



 (will not be displayed)


 
 
 
Please add 6 and 1 and type the answer here:
 

Live Comment Preview: