Your PC starts acting strange: apps crash on launch, Settings refuses to open, you get random error messages, or Windows feels slow for no clear reason. Before you reinstall Windows or download a "PC repair" tool, know this—Windows can repair itself.
Two built-in commands, DISM and SFC, scan your system files against a known-good copy and replace anything that is damaged. Here is how to run them.
Step 1: Open Command Prompt as Administrator
Press Start, type cmd, right-click Command Prompt, and select Run as administrator. Approve the User Account Control prompt.
Both commands require administrator rights. Without them, they will fail.
Step 2: Run DISM First
Run this command first. It repairs the component store—the master copy of Windows files that SFC uses for repairs.
text
DISM /Online /Cleanup-Image /RestoreHealth
This can take 10–20 minutes. You will see a progress bar that appears stuck around 20% and 62%—that is normal. Do not close the window.
Wait for: The operation completed successfully.
Step 3: Run SFC
Now scan and repair the actual system files:
text
sfc /scannow
This takes 5–15 minutes. Wait for it to reach 100% and read the result message.
Step 4: Understand the Result
SFC returns one of three messages:
- "Windows Resource Protection did not find any integrity violations." — No corruption found. Your issue is likely a driver or app.
- "Windows Resource Protection found corrupt files and successfully repaired them." — Fixed. Restart your PC.
- "Windows Resource Protection found corrupt files but was unable to fix some of them." — Run DISM again, then rerun SFC.
Step 5: Restart Your PC
Restart and test the problem. Most corruption-related issues disappear at this point.
Step 6: Check the Repair Log (Optional)
To see exactly which files were repaired, run:
text
findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log >"%userprofile%\Desktop\sfcdetails.txt"
A file called sfcdetails.txt appears on your Desktop with a line-by-line repair record.
Quick Command Summary
text
DISM /Online /Cleanup-Image /RestoreHealth sfc /scannow
Run in that order, in an administrator Command Prompt, then restart.
Why This Works
DISM fixes the component store, and SFC uses that store to repair individual Windows files. Running DISM first matters: if the source of repairs is itself corrupted, SFC cannot fix anything—which is why many people run sfc /scannow and still see errors.
When to Skip This
Do not run these commands for a slow PC caused by high RAM usage, a stuck Windows Update, or a failing hard drive—those have their own fixes. Use this when you see corruption symptoms: missing DLL errors, apps that close instantly, broken Settings pages, or "Windows Resource Protection" errors.
Final Note
This is a safe, built-in repair. It does not delete your files, apps, or personal data. It only replaces damaged Windows system files with clean copies—and it costs nothing but a few minutes.