How to Run a System File Checker on Windows
Your Windows PC relies on hundreds of core system files to run properly. When those files get corrupted — by a failed update, malware, unexpected shutdown, or just wear and tear — you might see strange errors, crashes, or sluggish performance. The System File Checker (SFC) is a built-in Windows tool designed to scan for and repair corrupted or missing system files automatically. Here's how it works, how to run it, and what affects whether it actually solves your problem.
What Is the System File Checker?
SFC (sfc.exe) is a command-line utility that's been part of Windows since Windows 98. It scans protected operating system files and compares them against a cached store of known-good versions. If it finds a file that's corrupted, altered, or missing, it replaces it automatically.
SFC doesn't touch your personal files, installed applications, or settings — it only works within Windows' own protected file space. It's not an antivirus tool, and it won't fix every Windows problem, but it's a reliable first step when your OS is misbehaving.
Before You Run SFC: One Important Step 🛠️
On modern versions of Windows (Windows 8, 10, and 11), Microsoft recommends running DISM (Deployment Image Servicing and Management) before SFC. Here's why: SFC pulls replacement files from a local cache called the Windows Component Store. If that store is itself corrupted, SFC will fail or report errors even when files genuinely need repair.
DISM repairs the Component Store first, giving SFC clean source files to work from. Running them in order gives you the best result:
- DISM first — restores the repair source
- SFC second — uses that source to fix system files
You can skip DISM if you're troubleshooting a minor issue and just want a quick scan, but for serious problems, the two-step approach is more reliable.
How to Run System File Checker
Step 1 — Open an Elevated Command Prompt or PowerShell
SFC requires administrator privileges. Without them, it will scan but won't be able to repair anything.
- Press Windows + S, type
cmdorPowerShell - Right-click the result and select Run as administrator
- Confirm the UAC prompt if it appears
Step 2 — (Recommended) Run DISM First
In the elevated window, type:
DISM /Online /Cleanup-Image /RestoreHealth Press Enter and wait. This process contacts Windows Update servers to download clean component files, so it requires an internet connection and can take 10–20 minutes depending on your connection speed and system state. You'll see a progress percentage — it may stall near 20% for a while, which is normal.
Step 3 — Run the System File Checker
Once DISM completes (or if you're skipping it), type:
sfc /scannow Press Enter. SFC will now scan all protected system files. This typically takes 5–15 minutes. Don't close the window or interrupt the process.
Step 4 — Read the Result
When the scan finishes, you'll see one of three messages:
| Result Message | What It Means |
|---|---|
| Windows Resource Protection did not find any integrity violations | No corrupted files detected — system files are clean |
| Windows Resource Protection found corrupt files and successfully repaired them | Files were damaged and have been fixed |
| Windows Resource Protection found corrupt files but was unable to fix some of them | Damage was found but couldn't be fully repaired — further steps needed |
If repairs were made, restart your PC before concluding whether the fix worked.
How to Check the SFC Log File
SFC logs everything it finds and does. If you want the details — which files were affected, what was repaired — you can find the log at:
C:WindowsLogsCBSCBS.log This file is large and dense, so searching for the term [SR] filters it down to SFC-specific entries. You can do this in Notepad with Ctrl + F, or run this command to export a filtered copy to your desktop:
findstr /c:"[SR]" %windir%LogsCBSCBS.log > "%userprofile%Desktopsfcdetails.txt" When SFC Can't Fix Everything
If SFC reports it found corruption but couldn't repair it, a few factors usually explain why:
- The Component Store itself is damaged — DISM may need to be run with a mounted Windows ISO as the source, rather than pulling from Windows Update
- Files are locked by a running process — some system files can't be replaced while Windows is fully active
- Offline SFC scan — on severely damaged systems, running SFC from the Windows Recovery Environment (WinRE) gives it access to files that are locked during normal boot
- Hard drive issues — underlying storage problems can cause file corruption to persist or return; running CHKDSK addresses this separately
Variables That Affect Your Results 🔍
Not every SFC scan plays out the same way. Several factors shape what you find and how cleanly it resolves:
- Windows version — Windows 10 and 11 handle SFC and DISM integration more smoothly than older versions; Windows 7 has a slightly different DISM workflow
- Internet connectivity — DISM's
/RestoreHealthoption needs a reliable connection; a spotty connection can cause it to stall or fail - How the corruption happened — a single bad update often repairs cleanly; deep malware damage or hardware-related corruption may require more involved recovery steps
- Whether you're running from a live session or recovery environment — some file replacements simply can't happen while those files are actively in use
- Drive health — SFC repairs corrupted files, but if the underlying drive is failing, corruption can return quickly
A straightforward corrupted update on a healthy drive with a stable internet connection is very different from a system that's been hit by ransomware or has a failing SSD. The tool is the same — what it encounters, and how completely it can resolve things, depends entirely on what's underneath.