Today I have decided to tell you how to add an option called “Command Prompt” when you right-click on a folder. With this option, a Command Prompt Window will launch and its current directory will be the path to the folder you have selected. I have decided to share with you this stuff because I myself, need to open command prompt again and again to execute some DOS/Shell commands and I think many programmers also have to do so. The problem is, when a command prompt is launched, the default path is normally the system path or your profile’s path. So every time you have to do “cd” command to change the directory shown to the path you want.
(Note: Use this trick at your own risk. I have applied it to Windows XP and Windows 7 and I am not sure about the rest of the Operating systems)
Follow this step by step instructions to do so, and I am sure you will enjoy it.
- Click on Start button and then open Run. You will see this window:
- In that window Type “regedit” and hit Enter. You will see this type of window:
- Expand to “HKEY_LOCAL_MACHINE>>SOFTWARE>
>Classes>>Folder>>shell” from the left panel of Registry Editor.
- Right-click on “shell” and select New > Key. Make sure a new key is created under “shell“. Change the name of this key to “Command Prompt”
- Right-click on this new key “Command Prompt” and select New > Key.
- Change the name of this key to “command“.
- Double-click on the “(Default)” text on the right window to bring up the edit box.
- Enter this text into the Value Data field:
- Click OK and close the registry.
- Now Open your “My Computer” and from the left side (as I have highlighted red in the below picture) right click on any folder and you will see “Command Prompt” in the list.
- Open it and Enjoy.