Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Windows 綜合教學 >> 關於 Windows

Windows 右鍵選單加入「清空回收站」與「重新開機」指令:登錄表匯入一鍵完成

編輯:關於 Windows

每天需清空回收站、重新開機,若能在右鍵選單直接執行該多方便。透過匯入登錄檔即可為檔案/資料夾/桌面背景右鍵選單新增這兩個指令。

一、新增「重新開機」指令

  1. Win + R → regedit → 定位 HKEY_CLASSES_ROOT\Directory\shell。
  2. 新增機碼 Restart → 預設值設為 重新開機。
  3. 其下新增 command 機碼 → 預設值設為:
    shutdown -r -t 1 -c "重新開機"
  4. 登出/重開機生效 → 資料夾右鍵見「重新開機」。

二、新增「清空回收站」指令 (適用檔案/資料夾右鍵)

  1. 建立文字文件貼入以下內容,另存為 EmptyRecycleBin.reg:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\empty]
"CommandStateHandler"="{c9298eef-69dd-4cdd-b153-bdbc38486781}"
"Description"="@shell32.dll,-31332"
"Icon"="shell32.dll,-254"
"MUIVerb"="@shell32.dll,-10564"

[HKEY_CLASSES_ROOT\*\shell\empty\command]
"DelegateExecute"="{48527bb3-e8de-450b-8910-8c4099cb8624}"

[HKEY_CLASSES_ROOT\Folder\shell\empty]
"CommandStateHandler"="{c9298eef-69dd-4cdd-b153-bdbc38486781}"
"Description"="@shell32.dll,-31332"
"Icon"="shell32.dll,-254"
"MUIVerb"="@shell32.dll,-10564"

[HKEY_CLASSES_ROOT\Folder\shell\empty\command]
"DelegateExecute"="{48527bb3-e8de-450b-8910-8c4099cb8624}"
  1. 雙擊匯入 → 確定。
  2. 任意檔案/資料夾右鍵 → 見「清空回收站」 (圖示為回收站圖示)。

此法調用系統內建 Shell 延伸模組,無需第三方軟體,相容性極佳。

Copyright © Windows教程網 All Rights Reserved