Howto: Create Windows Explorer Right Click Option “Open Command Prompt Here”

June 27, 2010

Open up notepad or another editor and paste this in:

Set objShell = CreateObject("WScript.Shell")
objShell.RegWrite "HKCR\Folder\Shell\MenuText\Command\", _
"cmd.exe /k cd " & chr(34) & "%1" & chr(34)
objShell.RegWrite "HKCR\Folder\Shell\MenuText\", "Command Prompt Here"

Save the file as command_prompt_here.vbs and double click it.

If you have issues running it you may need to run cscript.exe command_prompt_here.vbs.

The resulting menu looks like this in explorer:

Command prompt here shell extension