When Windows system files go missing or get corrupted, Microsoft says common symptoms include Windows features not working properly, system errors, or Windows becoming unresponsive or freezing. Before you reinstall anything, Windows 11 has two built-in repair tools: DISM (Deployment Image Servicing and Management) and SFC (System File Checker). This guide follows Microsoft's own instructions; Forge PC hasn't tested every error with them, and they won't fix faulty hardware.
Before you start
Step 1: open an elevated Command Prompt
Type cmd in the Start menu search, right-click Command Prompt and choose Run as administrator. Approve the prompt.
Step 2 (optional): check the Windows image
Microsoft Learn describes two quick checks:
Dism /Online /Cleanup-Image /CheckHealth reports whether the image is healthy, repairable or non-repairable.
Dism /Online /Cleanup-Image /ScanHealth scans for corruption and takes several minutes.
Step 3: run DISM RestoreHealth
Microsoft recommends running DISM before SFC, because DISM provides the files SFC needs. Type:
DISM.exe /Online /Cleanup-image /Restorehealth
It may take several minutes. DISM uses Windows Update as the source of repair files. If Windows Update itself is broken, Microsoft says you can point DISM at another source, such as a Windows installation or install media, with /Source: and /LimitAccess. If updates are stuck, see how to fix Windows Update stuck in Windows 11.
Step 4: run SFC
Then type:
sfc /scannow
SFC scans all protected system files and replaces corrupted ones with a cached copy. Don't close the window until verification reaches 100%.
Step 5: read the result
Microsoft lists four messages:
Message | What it means |
|---|
Windows Resource Protection did not find any integrity violations | No missing or corrupted system files |
Windows Resource Protection found corrupt files and successfully repaired them | The repair was successful |
Windows Resource Protection found corrupt files but was unable to fix some of them | See the CBS log for details |
Windows Resource Protection could not perform the requested operation | Run SFC in Safe Mode, and check the PendingDeletes and PendingRenames folders exist under %WinDir%\WinSxS\Temp |
For Safe Mode, our Safe Mode vs clean boot guide explains how to get there.
Step 6: view the details (if needed)
Microsoft's command to copy SFC's entries from the CBS log to a text file on your desktop is:
findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log >"%userprofile%\Desktop\sfcdetails.txt"
If it still doesn't work
Microsoft's article goes on to describe manually replacing a corrupted file with a known good copy, and says that if the steps don't work you may need to reinstall Windows using its recovery options. A System Restore point is worth trying first.
Our verdict
Run DISM /RestoreHealth first, then sfc /scannow, from an administrator Command Prompt, and read SFC's result message. If SFC can't run, try Safe Mode; if problems persist, use System Restore or Windows' recovery options.