Windows 8 桌面右鍵選單預設較簡單,若想快速執行鎖定、登出、切換使用者、睡眠、休眠、重新開機、關機等電源操作,可透過匯入登錄檔(.reg)在桌面右鍵選單建立「電源控制」子選單,一鍵直達常用電源功能。
將以下文字儲存為 右鍵選單.reg(編碼建議 UTF-16 LE 或 ANSI),雙擊匯入登錄表即可生效。
Windows Registry Editor Version 5.00
;Created by Vishal Gupta for AskVG.com
[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Power Menu]
"MUIVerb"="電源控制"
"SubCommands"="lock;logoff;switch;sleep;hibernate;restart;shutdown"
"Icon"="shell32.dll,215"
"Position"="bottom"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\lock]
@="鎖定"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\lock\command]
@="Rundll32 User32.dll,LockWorkStation"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\logoff]
@="登出"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\logoff\command]
@="Shutdown -l"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\switch]
@="切換使用者"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\switch\command]
@="tsdiscon.exe"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\sleep]
@="睡眠"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\sleep\command]
@="rundll32.exe powrprof.dll,SetSuspendState Sleep"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\hibernate]
@="休眠"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\hibernate\command]
@="Shutdown -h"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\restart]
@="重新開機"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\restart\command]
@="Shutdown -r -f -t 00"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\shutdown]
@="關機"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\shutdown\command]
@="shutdown -s -hybrid -t 00"
右鍵選單.reg,存檔類型選「所有檔案」。


若需移除,可建立對應的刪除登錄檔,或手動開啟 regedit 刪除 HKEY_CLASSES_ROOT\DesktopBackground\Shell\Power Menu 及 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\lock 等七個子機碼。