≡ Menu

Add command prompt option to Windows Explorer context menu

I found this very useful because, it takes you to required directory immediately without the need for opening a command prompt from start->Run and changing to required directory using cd command. This option enables you to right-click on any folder in windows explorer and select “Command Prompt”; this opens up a command prompt with that folder as your current directory.

What you need to do to get this option?:

It’s very simple, follow any of the below procedures…

A) Manual procedure
Well, you need to have administrator rights to do below registry modifications and I warn you to little bit careful while working on registry because, any improper modifications will lead to registry corruption.

  1. Open registry editor(start -> Run -> Type regedit)
  2. Navigate to HKEY_LOCAL_MACHINE/Software/Classes/Folder/Shell
  3. Create a new key named “Command prompt here..”.
  4. Create a key named “command” under “under newly created above key and set the default value to “cmd.exe /k pushd %1”
  5. Close regedit

B) Automated procedure

Run the following command and it will get the things configured for you 🙂

C:>reg add “HKLMSoftwareClassesFolderShellCommand Prompt here…command”
/ve /t REG_SZ /d “cmd.exe /k pushd %1”

The operation completed successfully


Now you right click on any folder and you will observe additional option “Command prompt here…” selecting which results in opening a new command prompt window with current directory as the one you selected. Look at the below screen shot.

If you want to put your own customized name in context menu, then replace “Command Prompt here..” with your own text.