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

Win7 磁碟機圖示顯示異常/錯誤?重新指派磁碟代號快速修復圖示快取問題

編輯:Windows 7 系統介紹

Windows 7 中磁碟機圖示(如 D 槽、E 槽)突然變成通用磁碟圖示、空白、或顯示錯誤圖示,通常非病毒感染,而是圖示快取資料庫損毀或磁碟代號對應關係暫時混亂。最簡單有效的修復法:在「磁碟管理」中暫時變更磁碟代號,再改回原代號,強制系統重建圖示關聯。

故障現象

  • 特定分區圖示變成預設「可移動磁碟」/「本機磁碟」通用圖示。
  • 圖示顯示空白、破損、或與其他磁碟機圖示互換。
  • 資料存取正常,僅圖示異常。

快速修復:重新指派磁碟代號

  1. 在「電腦」上按右鍵 → 選擇 「管理」 → 左側選擇 「磁碟管理」。

  1. 右鍵點擊圖示異常的分區(如 D:) → 選擇 「變更磁碟機代號與路徑」。

  1. 點擊 「變更」 → 指派一個未使用的字母(如 Z:) → 確定 → 確認警告視窗。
  2. 再次右鍵該分區 →「變更磁碟機代號與路徑」→「變更」→ 改回原代號 (D:) → 確定。

此操作強制系統更新掛載點管理器與 Shell 命名空間的圖示關聯,同時觸發圖示快取重建,通常即時生效,無需重開機。

進階:徹底重建圖示快取

若上述法無效,執行批次檔清除快取資料庫:

@echo off
taskkill /f /im explorer.exe
attrib -h -s -r "%localappdata%\IconCache.db"
del /f "%localappdata%\IconCache.db"
for /d %%d in ("%localappdata%\Microsoft\Windows\Explorer\*") do (
    attrib -h -s -r "%%d"
    del /f "%%d\thumbcache_*.db"
)
reg delete "HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\TrayNotify" /v IconStreams /f
reg delete "HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\TrayNotify" /v PastIconsStream /f
start explorer.exe

儲存為 RebuildIconCache.bat,以系統管理員身分執行。

桌面圖示出現黑色方塊?

執行以下註冊表清理:

Windows Registry Editor Version 5.00

[-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons]

儲存為 FixBlackIcon.reg 匯入,或建立批次檔:

@echo off
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons" /f
taskkill /f /im explorer.exe & start explorer.exe

快取檔案位置速查

快取類型路徑
主要圖示快取%LocalAppData%\IconCache.db
縮圖快取%LocalAppData%\Microsoft\Windows\Explorer\thumbcache_*.db
系統托盤圖示記憶HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\TrayNotify (IconStreams, PastIconsStream)

預防建議

  • 避免在檔案總管中大量複製/移動檔案時強制關機。
  • 定期清理暫存檔(cleanmgr 或 CCleaner),防止快取資料庫過大損毀。
  • 掛載虛擬磁碟 (VHD/ISO) 後正常卸載,勿直接刪除檔案。
Copyright © Windows教程網 All Rights Reserved