Skip to content

Instantly share code, notes, and snippets.

@ZoolWay
Last active September 2, 2018 20:56
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 ZoolWay/1df8ce81ba21b55b35a44ba468f0f04d to your computer and use it in GitHub Desktop.
Save ZoolWay/1df8ce81ba21b55b35a44ba468f0f04d to your computer and use it in GitHub Desktop.
Add "open elevated prompt" shift+right-click contextmenu of folders
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\runas]
@="Open elevated command window here"
"Extended"=""
"NoWorkingDirectory"=""
"HasLUAShield"=""
[HKEY_CLASSES_ROOT\Directory\shell\runas\command]
@="cmd.exe /s /k pushd \"%V\""
[HKEY_CLASSES_ROOT\Directory\Background\shell\runas]
@="Open elevated command window here"
"Extended"=""
"NoWorkingDirectory"=""
"HasLUAShield"=""
[HKEY_CLASSES_ROOT\Directory\Background\shell\runas\command]
@="cmd.exe /s /k pushd \"%V\""
[HKEY_CLASSES_ROOT\Directory\Background\shell\cmd]
"HideBasedOnVelocityId"=-
[HKEY_CLASSES_ROOT\Directory\shell\cmd]
"HideBasedOnVelocityId"=-
[HKEY_CLASSES_ROOT\Directory\shell\Powershell]
"ShowBasedOnVelocityId"=-
"HideBasedOnVelocityId"=dword:639bc8
[HKEY_CLASSES_ROOT\Directory\Background\shell\Powershell]
"ShowBasedOnVelocityId"=-
"HideBasedOnVelocityId"=dword:639bc8
@ZoolWay
Copy link
Author

ZoolWay commented Sep 2, 2018

Added more entries to remove migration from cmd to powershell with creator update. But those lines (see VelocityId) only work when you make yourself owner and set permissions on the 4 paths in the registry :-(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment