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

Windows 7 旗艦版 圖示顯示空白/損毀:重建圖示快取批次檔一鍵修復

編輯:Windows 7 系統介紹

現象

桌面、工作列、開始功能表、檔案總管圖示變空白、變成預設白紙圖示、或顯示錯誤圖示,經常發生於系統更新、清理工具清除快取、掛載映像檔後。

一鍵修復批次檔 (重建圖示快取)

  1. 記事本貼上下列程式碼,儲存為 RebuildIconCache.bat (編碼 ANSI/UTF-8 均可)。
  2. 右鍵 RebuildIconCache.bat → 「以系統管理員身分執行」。
  3. 螢幕閃爍 (explorer 重啟) 後即完成修復。
@echo off
rem 關閉 Windows 殼層程序 explorer
taskkill /f /im explorer.exe

rem 清理系統圖示快取資料庫
attrib -h -s -r "%userprofile%\AppData\Local\IconCache.db"
del /f "%userprofile%\AppData\Local\IconCache.db"

attrib /s /d -h -s -r "%userprofile%\AppData\Local\Microsoft\Windows\Explorer\*"
del /f "%userprofile%\AppData\Local\Microsoft\Windows\Explorer\thumbcache_32.db"
del /f "%userprofile%\AppData\Local\Microsoft\Windows\Explorer\thumbcache_96.db"
del /f "%userprofile%\AppData\Local\Microsoft\Windows\Explorer\thumbcache_102.db"
del /f "%userprofile%\AppData\Local\Microsoft\Windows\Explorer\thumbcache_256.db"
del /f "%userprofile%\AppData\Local\Microsoft\Windows\Explorer\thumbcache_1024.db"
del /f "%userprofile%\AppData\Local\Microsoft\Windows\Explorer\thumbcache_idx.db"
del /f "%userprofile%\AppData\Local\Microsoft\Windows\Explorer\thumbcache_sr.db"

rem 清理系統托盤記憶的圖示
echo y | reg delete "HKEY_CLASSES_ROOT\Local Settings\Software\Microsoft\Windows\CurrentVersion\TrayNotify" /v IconStreams
echo y | reg delete "HKEY_CLASSES_ROOT\Local Settings\Software\Microsoft\Windows\CurrentVersion\TrayNotify" /v PastIconsStream

rem 重啟 Windows 殼層程序 explorer
start explorer

手動步驟 (不想用批次檔)

  1. 工作管理員結束 explorer.exe。
  2. 開啟 %LocalAppData%,刪除 IconCache.db。
  3. 開啟 %LocalAppData%\Microsoft\Windows\Explorer,刪除所有 thumbcache_*.db。
  4. 登錄編輯器刪除 HKCR\Local Settings\Software\Microsoft\Windows\CurrentVersion\TrayNotify 下的 IconStreams、PastIconsStream。
  5. 工作管理員「檔案」→「新增工作」輸入 explorer.exe 重啟。

批次檔執行效果

原理說明

Windows 將圖示快取儲存於 IconCache.db 及 thumbcache_*.db,損毀即導致圖示異常。刪除快取檔案並清除托盤記憶,強制 Windows 重新讀取原始圖示資源並重建快取,即可恢復正常。

預防建議

  • 避免使用激進的系統清理工具勾選「圖示快取」。
  • 定期備份 %LocalAppData%\Microsoft\Windows\Explorer 資料夾。
Copyright © Windows教程網 All Rights Reserved