Windows 使用久了,常出現程式圖示變成白紙、錯誤圖示、或通知區域(系統匣)殘留已移除程式的圖示。這是因為圖示快取資料庫 IconCache.db 損壞或過期。提供兩支現成批次檔,雙擊即可一鍵修復,立竿見影。
新建文字檔命名為 clean_icon_cache.bat,貼上以下內容並存檔,滑鼠右鍵「以系統管理員身分執行」:
@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"
rem 清理縮圖快取(Windows 7/8/10/11)
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 重新啟動 explorer
start explorer.exe
新建 clean_tray_history.bat,同樣以管理員身分執行:
@echo off
taskkill /f /im explorer.exe
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
start explorer.exe