Skip to content

Instantly share code, notes, and snippets.

@AlexVallat
Created January 12, 2019 11:25
Show Gist options
  • Save AlexVallat/4ede0ea06aa14d6e15c57b97f8608944 to your computer and use it in GitHub Desktop.
Save AlexVallat/4ede0ea06aa14d6e15c57b97f8608944 to your computer and use it in GitHub Desktop.
Adds "Open command prompt" to folder context menu, and "Open elevated command prompt" to extended folder context menu (Shift+Right Click)
Windows Registry Editor Version 5.00
; Adds "Open command prompt" to folder context menu,
; and "Open elevated command prompt" to extended folder context menu (Shift+Right Click)
;
; For elevated command prompt, requires NirCmd <http://www.nirsoft.net/utils/nircmd.html>
; to be installed somewhere on the system path.
;
; Author: Alex Vallat
[HKEY_CLASSES_ROOT\Directory\shell\OpenElevatedCmd]
@="Open elevated command prompt"
"Extended"=""
"Icon"="imageres.dll,73"
[HKEY_CLASSES_ROOT\Directory\shell\OpenElevatedCmd\command]
@="nircmd elevate cmd /s /k pushd \"%V\""
[HKEY_CLASSES_ROOT\Directory\shell\OpenCmd]
@="Open command prompt"
[HKEY_CLASSES_ROOT\Directory\shell\OpenCmd\command]
@="cmd.exe /s /k pushd \"%V\""
[HKEY_CLASSES_ROOT\Directory\Background\shell\OpenElevatedCmd]
@="Open elevated command prompt"
"Extended"=""
"Icon"="imageres.dll,73"
[HKEY_CLASSES_ROOT\Directory\Background\shell\OpenElevatedCmd\command]
@="nircmd elevate cmd /s /k pushd \"%V\""
[HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCmd]
@="Open command prompt"
[HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCmd\command]
@="cmd.exe /s /k pushd \"%V\""
[HKEY_CLASSES_ROOT\Drive\shell\OpenElevatedCmd]
@="Open elevated command prompt"
"Extended"=""
"Icon"="imageres.dll,73"
[HKEY_CLASSES_ROOT\Drive\shell\OpenElevatedCmd\command]
@="nircmd elevate cmd /s /k pushd \"%V\""
[HKEY_CLASSES_ROOT\Drive\shell\OpenCmd]
@="Open command prompt"
[HKEY_CLASSES_ROOT\Drive\shell\OpenCmd\command]
@="cmd.exe /s /k pushd \"%V\""
[HKEY_CLASSES_ROOT\LibraryFolder\background\shell\OpenElevatedCmd]
@="Open elevated command prompt"
"Extended"=""
"Icon"="imageres.dll,73"
[HKEY_CLASSES_ROOT\LibraryFolder\background\shell\OpenElevatedCmd\command]
@="nircmd elevate cmd /s /k pushd \"%V\""
[HKEY_CLASSES_ROOT\LibraryFolder\background\shell\OpenCmd]
@="Open command prompt"
[HKEY_CLASSES_ROOT\LibraryFolder\background\shell\OpenCmd\command]
@="cmd.exe /s /k pushd \"%V\""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment