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

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

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.