Skip to content

Instantly share code, notes, and snippets.

@spronkets
Created January 20, 2019 19:29
Show Gist options
  • Save spronkets/db57adc2d7e4af47857819c03b744647 to your computer and use it in GitHub Desktop.
Save spronkets/db57adc2d7e4af47857819c03b744647 to your computer and use it in GitHub Desktop.
Registry - Add Instant Shutdown and Restart actions to context menu
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Shutdown]
"Icon"="shell32.dll,-28"
"MUIVerb"="Shut down"
"Position"="Bottom"
"SubCommands"=""
[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Shutdown\Shell\001ShutdownInstantly]
"MUIVerb"="Shut down instantly"
"Icon"="shell32.dll,-28"
[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Shutdown\Shell\001ShutdownInstantly\command]
@="shutdown -s -f -t 0"
[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Shutdown\Shell\002RestartInstantly]
"MUIVerb"="Restart instantly"
"Icon"="shell32.dll,-16739"
"CommandFlags"=dword:00000020
[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Shutdown\Shell\002RestartInstantly\command]
@="shutdown -r -f -t 0"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment