Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save h4ssi/eb527efbce16847bf338209a241cc6e5 to your computer and use it in GitHub Desktop.
Save h4ssi/eb527efbce16847bf338209a241cc6e5 to your computer and use it in GitHub Desktop.
reg file to add "Open command window here as administrator" option in shift+rightclick explorer context menu
Windows Registry Editor Version 5.00
; heavily based on http://superuser.com/a/374396/589519
[-HKEY_CLASSES_ROOT\Directory\shell\runas]
[HKEY_CLASSES_ROOT\Directory\shell\runas]
@="Open command window here as administrator"
"HasLUAShield"=""
"Extended"=""
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT\Directory\shell\runas\command]
@="cmd.exe /s /k pushd \"%V\""
[-HKEY_CLASSES_ROOT\Directory\Background\shell\runas]
[HKEY_CLASSES_ROOT\Directory\Background\shell\runas]
@="Open command window here as administrator"
"HasLUAShield"=""
"Extended"=""
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT\Directory\Background\shell\runas\command]
@="cmd.exe /s /k pushd \"%V\""
[-HKEY_CLASSES_ROOT\Drive\shell\runas]
[HKEY_CLASSES_ROOT\Drive\shell\runas]
@="ElevatedCMD"
"HasLUAShield"=""
"Extended"=""
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT\Drive\shell\runas\command]
@="cmd.exe /s /k pushd \"%V\""
; not used in windows 10?
;
;[HKEY_CLASSES_ROOT\LibraryFolder\background\shell]
;@="none"
;
;[-HKEY_CLASSES_ROOT\LibraryFolder\background\shell\runas]
;
;[HKEY_CLASSES_ROOT\LibraryFolder\background\shell\runas]
;@="Open command window here as administrator"
;"HasLUAShield"=""
;"Extended"=""
;"NoWorkingDirectory"=""
;
;[HKEY_CLASSES_ROOT\LibraryFolder\background\shell\runas\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