圖示快取資料庫 IconCache.db 及縮圖快取 thumbcache_*.db 損毀、過期或權限錯誤,導致總管讀取錯誤圖示資料,顯示空白、預設通用圖示或殘缺圖像。
@echo off
rem 關閉 Windows 殼層程式 explorer.exe
taskkill /f /im explorer.exe
rem 清理系統圖示快取資料庫
attrib -h -s -r "%userprofile%\AppData\Local\IconCache.db"
del /f "%userprofile%\AppData\Local\IconCache.db"
rem 清理縮圖快取 (Win7 多種尺寸)
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.exe
start explorer.exe
echo 圖示快取已重建完成,請檢查桌面與工作列圖示。
pause
重建圖示快取.bat(編碼選 ANSI 或 UTF-8 with BOM,避免中文亂碼)。explorer.exe。del 與 reg delete 指令。explorer.exe。chkdsk /f、S.M.A.R.T.)。