How to Repair Windows 11 System Files with SFC and DISM
The Problem
Apps crash, Windows features misbehave, updates fail, or you're following a troubleshooting guide that says "repair your system files." Windows keeps thousands of protected system files, and when they get corrupted — by a bad update, sudden power loss, disk errors, or malware — almost anything can break.
Windows ships two built-in repair tools for exactly this:
- SFC (System File Checker) — scans protected system files and replaces corrupted ones from a local cache.
- DISM (Deployment Image Servicing and Management) — repairs the component store, the source that SFC restores files from. If the store itself is damaged, SFC can't fix anything until DISM repairs it first.
They work as a pair. This guide shows the right order and how to read the results.
Quick Checks Before You Start
- You need an administrator terminal. Right-click the Start button and choose Terminal (Admin) — accept the User Account Control prompt.
- You need an internet connection for DISM — it downloads clean files from Windows Update when repairing.
- Plug in laptops. A full scan can take 15–45 minutes; don't let the battery die mid-repair.
Step 1: Run SFC First
- In the admin terminal, type:
sfc /scannow - Press Enter and wait — verification runs to 100% and must not be interrupted.
- Read the result:
- "Windows Resource Protection did not find any integrity violations" — files are fine; your problem lies elsewhere.
- "...found corrupt files and successfully repaired them" — corruption fixed. Restart and re-test your original problem.
- "...found corrupt files but was unable to fix some of them" — the repair source is damaged. Continue to Step 2, then repeat SFC.
Step 2: Run DISM to Repair the Component Store
- In the same admin terminal, run:
DISM /Online /Cleanup-Image /RestoreHealth - Wait for it to reach 100%. It often pauses a long time around 62% — that's normal, don't close the window.
- When it reports "The restore operation completed successfully", the component store is repaired.
Optional quicker checks if you only want a diagnosis: DISM /Online /Cleanup-Image /CheckHealth (instant flag check) and /ScanHealth (deeper scan, no repair).
Step 3: Run SFC Again
Now that DISM has fixed the repair source, give SFC a working set of clean files:
sfc /scannow
This second pass usually resolves the "unable to fix" result from Step 1. Restart your PC afterward.
Step 4: If Repairs Still Fail
- Check the disk first — file corruption often comes from drive errors:
Approve the restart prompt withchkdsk C: /f /rYand reboot. Also verify SSD and hard drive health. - Review the SFC log for what couldn't be fixed: the details are in
C:\Windows\Logs\CBS\CBS.log(search for "cannot repair"). - In-place repair install — reinstalls Windows over itself, keeping files and apps, and replaces every system file: reinstall Windows without losing data.
When to Use This Guide
Run the SFC → DISM → SFC sequence whenever you hit:
- Apps that crash or won't open
- Windows Update errors or a stuck update
- Blue screens like MEMORY_MANAGEMENT or CRITICAL_PROCESS_DIED
- Broken built-ins: Start menu, Search, or the Settings app
It's the single most useful repair sequence in Windows — safe to run any time, and it never deletes your personal files.
Related guides
How to Fix the Settings App Not Opening in Windows 11
Settings app won't open, crashes instantly, or shows a blank window in Windows 11? Fix it with these steps — reset, re-register, and repair methods that work.
How to Fix Sleep and Hibernation Not Working in Windows 11
PC won't sleep, wakes instantly, or hibernate is missing? Fix power plans, wake timers, fast startup, and drivers that block sleep on Windows 11.
How to Set Up Remote Desktop in Windows 11
Control your PC from another device with Remote Desktop — enable RDP on Pro, work around Home limits, router port forwarding, and safer alternatives.
How to Activate Windows 11 (and Fix Activation Errors)
Windows 11 not activated, error 0x803fa067, or changed hardware—link your Microsoft account, enter a product key, and fix activation the official way.
How to Fix OneDrive Sync Issues in Windows 11
OneDrive stuck on 'Processing', files not uploading, or red X icons—reset the client, check storage, and fix account and path errors on Windows 11.