Skip to content

Instantly share code, notes, and snippets.

@b9AcE
Last active July 7, 2019 07:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save b9AcE/61f91bae71251837de75b44fa9a45b0b to your computer and use it in GitHub Desktop.
Save b9AcE/61f91bae71251837de75b44fa9a45b0b to your computer and use it in GitHub Desktop.
Adds cmd-prompt at right-clicked object in Windows Explorer.
Windows Registry Editor Version 5.00
; Always show CMD-prompt in all locations for explorer and rename
; it to just "CMD..." for menu brevity
; (the latter can be restored to "@shell32.dll,-8506" if desired).
; The first step is to remove the empty string "Extrended" which on some
; versions of Windows exists and will otherwise restrict the menu entry
; to being shown when shift is simultaneously pressed.
; Windows 10 requires changing permissions of the registry keys before use.
; Extremely simple, but since all versions I had encountered were
; lacking in functionality or clarity, I wrote my own.
; Version 20190707 by b9AcE.
; Right-clicking on drive-icons in explorer.
[HKEY_CLASSES_ROOT\Drive\shell\cmd]
@="&CMD..."
"Extended"=-
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT\Drive\shell\cmd\command]
@="\"C:\\Windows\\System32\\cmd.exe\" /s /k pushd \"%V\""
; Rightclicking on drirectory-icons in explorer.
[HKEY_CLASSES_ROOT\Directory\shell\cmd]
@="&CMD..."
"Extended"=-
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT\Directory\shell\cmd\command]
@="\"C:\\Windows\\System32\\cmd.exe\" /s /k pushd \"%V\""
; Right-clicking on drive-backgrouns in explorer.
[HKEY_CLASSES_ROOT\Drive\Background\Shell\cmd]
@="&CMD..."
"Extended"=-
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT\Drive\Background\Shell\cmd\command]
@="\"C:\\Windows\\System32\\cmd.exe\" /s /k pushd \"%V\""
; Right-clicking on a directory bacground in explorer.
[HKEY_CLASSES_ROOT\Directory\Background\shell\cmd]
@="&CMD..."
"Extended"=-
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT\Directory\Background\shell\cmd\command]
@="\"C:\\Windows\\System32\\cmd.exe\" /s /k pushd \"%V\""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment