Advertisement
aveyo

Add Power Menu to Desktop.reg

Apr 3rd, 2018
1,241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
REG 1.80 KB | None | 0 0
  1. Windows Registry Editor Version 5.00
  2.  
  3. [-HKEY_CLASSES_ROOT\DesktopBackground\Shell\Power]
  4.  
  5. [HKEY_CLASSES_ROOT\DesktopBackground\Shell\Power]
  6. "Icon"="shell32.dll,-28"
  7. "MUIVerb"="Power"
  8. "Position"="Bottom"
  9. "SubCommands"=""
  10.  
  11. [HKEY_CLASSES_ROOT\DesktopBackground\Shell\Power\shell\001Sleep]
  12. "MUIVerb"="Sleep"
  13. "Icon"="shell32.dll,-26"
  14.  
  15. [HKEY_CLASSES_ROOT\DesktopBackground\Shell\Power\shell\001Sleep\command]
  16. @="powershell.exe -C \"$m='[DllImport(\\\"Powrprof.dll\\\",SetLastError=true)]static extern bool SetSuspendState(bool hibernate,bool forceCritical,bool disableWakeEvent);public static void PowerSleep(){SetSuspendState(false,false,false); }';add-type -name Import -member $m -namespace Dll; [Dll.Import]::PowerSleep();\""
  17.  
  18. [HKEY_CLASSES_ROOT\DesktopBackground\Shell\Power\shell\002Shutdown]
  19. "MUIVerb"="Shutdown"
  20. "Icon"="shell32.dll,-28"
  21. "CommandFlags"=dword:00000020
  22.  
  23. [HKEY_CLASSES_ROOT\DesktopBackground\Shell\Power\shell\002Shutdown\command]
  24. @="shutdown /s /f /t 0"
  25.  
  26. [HKEY_CLASSES_ROOT\DesktopBackground\Shell\Power\shell\003Restart]
  27. "MUIVerb"="Restart"
  28. "Icon"="shell32.dll,-16739"
  29. ;"CommandFlags"=dword:00000020
  30.  
  31. [HKEY_CLASSES_ROOT\DesktopBackground\Shell\Power\shell\003Restart\command]
  32. @="shutdown /r /f /t 0"
  33.  
  34. [HKEY_CLASSES_ROOT\DesktopBackground\Shell\Power\shell\004RestartBootMenu]
  35. "MUIVerb"="Restart to BootMenu"
  36. "Icon"="cmd.exe"
  37. ;"CommandFlags"=dword:00000020
  38.  
  39. [HKEY_CLASSES_ROOT\DesktopBackground\Shell\Power\shell\004RestartBootMenu\command]
  40. @="shutdown.exe /r /o /f /t 0"
  41.  
  42. [HKEY_CLASSES_ROOT\DesktopBackground\Shell\Power\shell\005RefreshExplorer]
  43. "MUIVerb"="Refresh Explorer"
  44. "Icon"="explorer.exe"
  45. "CommandFlags"=dword:00000020
  46.  
  47. [HKEY_CLASSES_ROOT\DesktopBackground\Shell\Power\shell\005RefreshExplorer\command]
  48. @="cmd.exe /c taskkill /f /im explorer.exe  & start explorer.exe"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement