Skip to content

Instantly share code, notes, and snippets.

@Gnomorian
Created December 21, 2021 01:13
Show Gist options
  • Save Gnomorian/bc828cb69f48295dbc0412fd43bd3ad8 to your computer and use it in GitHub Desktop.
Save Gnomorian/bc828cb69f48295dbc0412fd43bd3ad8 to your computer and use it in GitHub Desktop.
adding handle.exe to context menu
adding Handle.exe to the context menu:
Computer\HKEY_CLASSES_ROOT\Directory\shell\runas
HasLUASHield = ""
MUIVerb = "Query open handles"
Computer\HKEY_CLASSES_ROOT\Directory\shell\runas\Command
Default="powershell.exe -noexit -command handle.exe -u '%V'"
Computer\HKEY_CLASSES_ROOT\Directory\Background\shell\runas
HasLUASHield = ""
MUIVerb = "Query open handles"
Computer\HKEY_CLASSES_ROOT\Directory\Background\shell\runas\Command
Default="powershell.exe -noexit -command handle.exe -u '%V'"
// the display name of the conttext menu item
MUIVerb String
// display a picture of the admin shield on the icon (doesnt actually force "run as admin"
HasLUASHield String
websites that helped work this out:
https://gist.github.com/sorashi/9d29387ae9c1b66b2dd687c4196fbda3
https://docs.microsoft.com/en-us/windows/win32/shell/how-to--create-cascading-menus-with-the-subcommands-registry-entry
https://docs.microsoft.com/en-us/windows/win32/shell/context-menu-handlers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment