Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學

Windows 8 以登錄檔自訂桌面右鍵選單加入電源控制選單

編輯:Win8 系統應用技巧

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"

操作步驟

  1. 桌面右鍵 → 「新增」 → 「文字文件」。
  2. 貼上上述登錄檔內容,另存新檔:檔名 右鍵選單.reg,存檔類型選「所有檔案」。
  3. 雙擊該 .reg 檔案,確認 UAC 提示 → 「是」匯入登錄表。
  4. 桌面空白處右鍵,即可看到「電源控制」子選單,展開含所有電源指令。

另存為右鍵選單.reg

雙擊匯入登錄表

桌面右鍵選單效果圖

移除方式

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

Copyright © Windows教程網 All Rights Reserved