萬盛學電腦網

您现在的位置: 萬盛學電腦網 >> 作業系統 >  >> Windows XP 教學

Windows XP 無法安裝新字體?Fonts 資料夾遺失 desktop.ini 修復法

字體安裝失效真凶:C:\Windows\Fonts\desktop.ini 遺失

XP 下將字體檔複製到 C:\Windows\Fonts 卻不彈出「安裝新字體」對話框、字體無法使用,主因是特殊系統資料夾的 desktop.ini 設定檔遺失。本文提供精準修復步驟與原理解析。

現象確認

  • 複製 .ttf/.fon 字體檔到 C:\Windows\Fonts
  • 無「安裝新字體」進度對話框
  • 字體資料夾檔案選單無「安裝新字體」選項
  • 控制台 → 字體 → 檔案選單無「安裝新字體」
  • 字體檔實際存在於資料夾但系統不識別

根因分析

  • C:\Windows\Fonts 是「系統資料夾」+「唯讀」屬性,由 desktop.ini 定義特殊行為
  • desktop.ini 內含:
    [.ShellClassInfo]
    UICLSID={BD84B380-8CA2-1069-AB1D-08000948F534} (字體資料夾類別識別碼)
  • 此檔案隱藏 + 系統屬性,工具 → 資料夾選項 → 「顯示所有檔案」也看不見
  • 常見遺失原因:系統優化工具/清理工具/病毒掃描「刪除所有 desktop.ini」、手動清理、磁碟錯誤

修復步驟:重建 desktop.ini

  1. 開啟記事本 (Notepad)
  2. 輸入以下內容 (不含引號):
    [.ShellClassInfo]
    UICLSID={BD84B380-8CA2-1069-AB1D-08000948F534}
  3. 另存為:C:\Windows\Fonts\desktop.ini (編碼 ANSI/UTF-16 LE 均可)
  4. 設定檔案屬性:右鍵 desktop.ini → 內容 → 勾選「唯讀」+「隱藏」→ 確定
  5. 或命令列:
    attrib +r +h +s C:\Windows\Fonts\desktop.ini
  6. 重新開機或重新啟動 Explorer (taskkill /f /im explorer.exe & start explorer.exe)

驗證修復

  1. 複製任意 .ttf 字體到 C:\Windows\Fonts
  2. 應彈出「安裝新字體」進度對話框
  3. 控制台 → 字體 → 檔案 → 「安裝新字體」選項恢復
  4. 應用程式 (Word、PS) 字體清單出現新字體

進階:註冊表對應鍵值 (若 desktop.ini 正常仍失效)

[HKEY_CLASSES_ROOT\Folder\shell\newfont]
@="安裝新字體(&I)"

[HKEY_CLASSES_ROOT\Folder\shell\newfont\command]
@="rundll32.exe shell32.dll,SHHelpShortcuts_RunDLL InstallFontFolder"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\NameSpace\{BD84B380-8CA2-1069-AB1D-08000948F534}]
@="Fonts"

確認上述機碼存在且正確。

批次修復腳本 (適用多台電腦)

@echo off
echo 修復 Fonts 資料夾 desktop.ini...
echo [.ShellClassInfo] > "%windir%\Fonts\desktop.ini.tmp"
echo UICLSID={BD84B380-8CA2-1069-AB1D-08000948F534} >> "%windir%\Fonts\desktop.ini.tmp"
move /y "%windir%\Fonts\desktop.ini.tmp" "%windir%\Fonts\desktop.ini"
attrib +r +h +s "%windir%\Fonts\desktop.ini"
echo 完成,請重新開機或重啟 Explorer。
pause

預防建議

  • 優化/清理工具加入白名單保護 C:\Windows\Fonts\desktop.ini
  • 殺毒軟體設定排除系統資料夾 desktop.ini 掃描/刪除
  • 定期備份 %windir%\Fonts\desktop.ini 至外部儲存
  • 安裝字體建議使用「控制台 → 字體 → 檔案 → 安裝新字體」正規管道,而非直接複製檔案
copyright © 萬盛學電腦網 all rights reserved