Skip to content

Instantly share code, notes, and snippets.

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 karanssh/c9783ec10a67bc11b1e840ee85e99432 to your computer and use it in GitHub Desktop.
Save karanssh/c9783ec10a67bc11b1e840ee85e99432 to your computer and use it in GitHub Desktop.
Add "open command window here as administrator" to Windows explorer context menu (reg file)
Windows Registry Editor Version 5.00
; Created by: Shawn Brink
; Created on: August 10th 2016
; Tutorial: http://www.tenforums.com/tutorials/59686-open-command-window-here-administrator-add-windows-10-a.html
[HKEY_CLASSES_ROOT\Directory\shell\OpenCmdHereAsAdmin]
@="Open command window here as administrator"
"Extended"=-
"Icon"="imageres.dll,-5324"
[HKEY_CLASSES_ROOT\Directory\shell\OpenCmdHereAsAdmin\command]
@="PowerShell -windowstyle hidden -Command \"Start-Process cmd -ArgumentList '/s,/k,pushd,%V' -Verb RunAs\""
[HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCmdHereAsAdmin]
@="Open command window here as administrator"
"Extended"=-
"Icon"="imageres.dll,-5324"
[HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCmdHereAsAdmin\command]
@="PowerShell -windowstyle hidden -Command \"Start-Process cmd -ArgumentList '/s,/k,pushd,%V' -Verb RunAs\""
[HKEY_CLASSES_ROOT\Drive\shell\OpenCmdHereAsAdmin]
@="Open command window here as administrator"
"Extended"=-
"Icon"="imageres.dll,-5324"
[HKEY_CLASSES_ROOT\Drive\shell\OpenCmdHereAsAdmin\command]
@="PowerShell -windowstyle hidden -Command \"Start-Process cmd -ArgumentList '/s,/k,pushd,%V' -Verb RunAs\""
[HKEY_CLASSES_ROOT\LibraryFolder\background\shell\OpenCmdHereAsAdmin]
@="Open command window here as administrator"
"Extended"=-
"Icon"="imageres.dll,-5324"
[HKEY_CLASSES_ROOT\LibraryFolder\background\shell\OpenCmdHereAsAdmin\command]
@="PowerShell -windowstyle hidden -Command \"Start-Process cmd -ArgumentList '/s,/k,pushd,%V' -Verb RunAs\""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment