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

自訂資源管理器資料夾圖示顏色:註冊表 Shell Icons 機碼法

編輯:Windows XP 系統介紹

效果

特定資料夾在總管中顯示**自訂圖示/顏色**,快速視覺辨識常用目錄(如:紅色=重要、綠色=專案、藍色=備份)。

準備工作

  • 取得 .ico 圖示檔(自製/下載/從 dll/exe 提取)。
  • 記下圖示絕對路徑(如 D:\Icons\RedFolder.ico)。

註冊表操作

  1. regedit → 展開:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons
  2. 右側空白處右鍵 → 新增 → **字串值** → 名稱輸入數字索引(如 4)。
  3. 雙擊 4 → 數值資料填入圖示完整路徑(D:\Icons\RedFolder.ico)。
  4. 若要指定某資料夾用此圖示:該資料夾建立 desktop.ini,內容:
    [.ShellClassInfo]
    IconResource=D:\Icons\RedFolder.ico,0
    並設資料夾屬性「系統」或「唯讀」觸發總管重讀。

清除圖示快取生效

  • 刪除 %SystemRoot%\ShellIconCache (Win9x/XP) 或 %WinDir%\ShellIconCache (NT/2000)。
    隱藏檔需先 attrib -h %SystemRoot%\ShellIconCache 顯示再刪。
  • XP/2000:登出重新登入即可;9x/Me:需重開機。

補充

現代 Windows (7/8/10/11) 建議改用資料夾右鍵→「內容」→「自訂」→「更換圖示」圖形化操作,無需動註冊表。本法適用於舊版系統或批次部署腳本。

Copyright © Windows教程網 All Rights Reserved