Quick Registry Hack to Add a Command Prompt to Folders
Ever want a command prompt in a folder and didn’t want to install the Command Prompt Here power tool from Microsoft? Well you’re in luck cause there’s an easy way to add a right click menu item that opens a command prompt for the folder you’re clicking on (lots of good information in that link).
Go to:
HKEY_CLASSES_ROOT\SOFTWARE\Classes\Directory\shell\
Add a new key called “cmd” and set it’s default value at”Command Prompt Here”. Then to “cmd” add a new key called “command” and change it’s default value to “cmd.exe /k pushd %L”. Do the same for:
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell
In other words add the “cmd” and set it’s default value, then add “command” to that and set it’s default value as above. Or you can download this reg file (CAUTION! Event though I use this myself, editing your registry may be really bad. Like no more using your computer bad. DON’T ADD THIS UNLESS YOU KNOW WHAT YOU’RE DOING!!):
In order to remove these entries, you can manually delete these keys, or you can right a reg file that looks like this:
[-HKEY_CLASSES_ROOT\SOFTWARE\Classes\Directory\shell\cmd]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\cmd]
Neat eh? To remove registry keys, just create a plain text file, paste in the registry entry you want to remove, add a minus sign in front of the key and inside the bracket, and save the plan text file with a “.reg” extension. Run the file and presto, no more entry. Almost scary how easy that is…
I’ve included the above code already in the 7z file with the MyCommandPromptHere.reg as well, and you can find out a little more about modifying registry entries here. Enjoy!!