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

Windows Vista 系統檔案完整性檢查與修復:sfc /scannow 完整參數詳解

編輯:Windows Vista 教學

惡意程式、錯誤更新、硬碟壞軌皆可能損毀系統檔案。Vista 內建 sfc.exe (System File Checker) 可掃描並自動修復受保護系統檔案,無需重開機進入修復環境。

sfc.exe Vista 版參數完整表

參數功能適用場景
/scannow掃描所有受保護系統檔案完整性,自動以快取副本修復損毀檔案最常用、首選修復指令
/verifyonly僅掃描回報,不自動修復審計、確認問題範圍
/scanfile=<完整路徑>掃描指定單一檔案,損毀則修復懷疑特定檔案 (如 kernel32.dll) 異常
/verifyfile=<完整路徑>僅驗證指定檔案,不修復檢查特定檔案狀態
/offbootdir=<磁碟機> /offwindir=<Windows目錄>離線修復模式:指定啟動磁碟與 Windows 目錄 (WinPE/修復環境用)無法開機時從安裝光碟修復環境執行

標準修復流程

  1. 管理員 CMD (Win → cmd → Ctrl+Shift+Enter)。
  2. 執行:
    sfc /scannow
  3. 等待進度條完成 (約 5-15 分鐘,視磁碟速度)。
  4. 查看結果:
  • 未發現完整性違規:系統檔案健康。
  • 已修復損毀檔案:詳細記錄於 %windir%\Logs\CBS\CBS.log (搜尋 [SR] 關鍵字)。
  • 無法修復部分檔案:需手動從安裝媒體提取替換,或執行 DISM 修復元件存儲 (DISM /Online /Cleanup-Image /RestoreHealth,Vista 需安裝 DISM 套件)。

sfc /scannow 執行畫面

進階:CBS 日誌分析

findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log > "%userprofile%\Desktop\sfc_log.txt"

開啟產出的 sfc_log.txt,每筆記錄含檔案路徑、雜湊比對結果、修復動作 (已修復/無法修復/已忽略)。

與 XP 版差異

  • XP 僅支援 /scannow、/scanonce、/scanboot、/revert、/purgecache、/cachesize。
  • Vista 新增 /verifyonly、/scanfile、/verifyfile、/offbootdir、/offwindir,功能更細緻、支援離線修復。

sfc /scannow 是系統維護的「萬用藥」,建議每月執行一次、安裝大型更新後必跑、懷疑中毒優先跑。配合 CBS 日誌分析,能精準掌握系統健康狀態。

Copyright © Windows教程網 All Rights Reserved