Best Order to Repair Corrupted Windows System Files
For most Windows 10 and Windows 11 problems, the safest repair sequence is to run DISM /RestoreHealth first, restart the computer, and then run sfc /scannow. DISM repairs the component store that Windows uses as a source for clean files, while SFC checks and replaces protected operating system files.
Open an elevated terminal
Run Command Prompt, PowerShell, or Windows Terminal as administrator.
RequiredRepair the component store
Use DISM to restore the Windows image that SFC relies on.
Recommended firstScan protected system files
Use SFC to replace corrupted or missing protected files.
Final checkWhen You Should Check System File Integrity in Windows
System file corruption can appear after a failed update, power loss, disk errors, unstable drivers, aggressive cleanup tools, malware removal, or manual deletion of Windows files. The commands in this guide do not replace a full backup, but they are often the first reliable repair step before a reset or reinstall.
Before Running SFC or DISM in Windows 10 and Windows 11
These checks are safe in normal use, but they should be run from an elevated console and preferably after you save open work. On unstable systems, start with basic disk and update checks before repeating the repair commands.
- Save open files and close unnecessary applications.
- Connect a laptop to power so the repair process is not interrupted.
- Make sure the system drive has free space, ideally several gigabytes.
- Use an administrator account.
- Restart Windows once before starting, especially after failed updates.
Open Command Prompt or Terminal as administrator
Press Win + X and choose Terminal (Admin), Windows PowerShell (Admin), or Command Prompt (Admin). You can use either PowerShell or Command Prompt for the commands below.
How to Run SFC Scannow to Repair Protected Windows Files
System File Checker scans protected Windows files and replaces corrupted versions with known-good copies from the component store. If the component store itself is damaged, SFC may find corruption but fail to repair it. In that case, run DISM and then run SFC again.
Run the full SFC scan
Administrator terminalsfc /scannow
Wait until verification reaches 100%.
Understand common SFC results
| Message | Meaning | Next action |
|---|---|---|
| Windows Resource Protection did not find any integrity violations | SFC did not detect corrupted protected system files. | If the issue continues, check drivers, updates, disk health, or app-specific causes. |
| Windows Resource Protection found corrupt files and successfully repaired them | SFC found corruption and replaced the damaged files. | Restart Windows and test the original problem again. |
| Windows Resource Protection found corrupt files but was unable to fix some of them | SFC detected corruption but could not fully repair it. | Run DISM, restart, then run sfc /scannow again. |
| Windows Resource Protection could not perform the requested operation | The scan could not complete due to a system, disk, permission, or recovery environment problem. | Run the scan in Safe Mode or use offline SFC from WinRE. |
sfc /scannow one more time. A clean second scan confirms that the repair is stable.
How to Use DISM RestoreHealth to Repair the Windows Image
DISM repairs the Windows component store. This is the source that Windows uses for servicing, updates, optional features, and many SFC repairs. If SFC cannot fix files, DISM is usually the next command to run.
Check whether the image is repairable
Administrator terminalDISM /Online /Cleanup-Image /CheckHealth
This is a quick check. It does not repair anything.
Scan the component store more deeply
Administrator terminalDISM /Online /Cleanup-Image /ScanHealth
This scan takes longer and looks for component store corruption.
Repair the Windows image
Administrator terminalDISM /Online /Cleanup-Image /RestoreHealth
After DISM finishes successfully, restart your PC and run SFC again:
Administrator terminalsfc /scannow
If DISM cannot download repair files
If DISM reports source file errors, connect to the internet, disable VPN/proxy temporarily if it blocks Windows Update, and try again. If it still fails, use a Windows ISO as a local repair source.
Offline SFC and DISM Repair from Windows Recovery Environment
Offline repair is useful when Windows does not boot, SFC cannot run in the live system, or the system drive letters are different in recovery mode. In WinRE, the Windows partition may not be C:, so confirm the correct drive letter before running commands.
Find the Windows drive letter in WinRE
Windows Recovery Environmentdiskpart
list volume
exit
Look for the volume that contains the Windows folder. In the examples below, replace C: with the correct Windows partition if WinRE assigns a different letter.
Run offline SFC
Windows Recovery Environmentsfc /scannow /offbootdir=C:\ /offwindir=C:\Windows
Run offline DISM with a mounted Windows ISO
If you have Windows installation media or a mounted ISO, identify the drive letter that contains sources\install.wim or sources\install.esd. In this example, the installation media is D:.
Windows Recovery EnvironmentDISM /Image:C:\ /Cleanup-Image /RestoreHealth /Source:wim:D:\sources\install.wim:1 /LimitAccess
If your media contains install.esd instead of install.wim, use:
Windows Recovery EnvironmentDISM /Image:C:\ /Cleanup-Image /RestoreHealth /Source:esd:D:\sources\install.esd:1 /LimitAccess
How to Read SFC and DISM Logs After a System File Repair
When the repair result is unclear, check the logs. They can show which files were repaired, which files could not be repaired, and whether DISM failed because of a missing source, servicing stack issue, or update component problem.
SFC log location
C:\Windows\Logs\CBS\CBS.log
To extract only SFC-related entries to a file on the desktop, run:
Administrator terminalfindstr /c:"[SR]" %windir%\Logs\CBS\CBS.log > "%userprofile%\Desktop\sfc-details.txt"
DISM log location
C:\Windows\Logs\DISM\dism.log
What to Do If SFC or DISM Cannot Repair Windows
If SFC and DISM do not complete or the same corruption returns after reboot, the underlying issue may be outside the protected system file set. Check the storage device, Windows Update components, malware status, and recently installed drivers.
Try these next
- Restart and repeat
sfc /scannow. - Run DISM with a matching Windows ISO source.
- Run the scan in Safe Mode.
- Check the system drive for file system errors.
- Uninstall recently added unstable drivers or system tools.
Avoid these mistakes
- Do not download random DLL files from unknown websites.
- Do not delete files manually from
C:\Windows\WinSxS. - Do not interrupt DISM at the same percentage repeatedly.
- Do not use a Windows ISO from a different architecture.
- Do not ignore disk health warnings or SMART errors.
Check the file system on the Windows drive
Administrator terminalchkdsk C: /scan
If Windows reports that offline repair is required, schedule a deeper check:
Administrator terminalchkdsk C: /f
Windows System File Repair Command Reference
| Command | Purpose | Use when |
|---|---|---|
sfc /scannow |
Checks protected system files and repairs them when possible. | Windows runs but system components behave incorrectly. |
DISM /Online /Cleanup-Image /CheckHealth |
Quickly checks whether component store corruption is already flagged. | You want a fast status check. |
DISM /Online /Cleanup-Image /ScanHealth |
Performs a deeper component store scan. | Windows Update or SFC errors suggest image corruption. |
DISM /Online /Cleanup-Image /RestoreHealth |
Repairs the component store using Windows Update or configured sources. | SFC cannot repair files or Windows servicing is broken. |
sfc /scannow /offbootdir=C:\ /offwindir=C:\Windows |
Runs SFC against an offline Windows installation. | Windows does not boot or live SFC cannot complete. |
Frequently Asked Questions About SFC and DISM
Q Should I run SFC or DISM first?â
sfc /scannow first is fine. For stubborn corruption, failed repairs, or update-related errors, run DISM /Online /Cleanup-Image /RestoreHealth first, restart, and then run SFC.Q Can SFC delete my personal files?â
Q Why does DISM get stuck at a percentage?â
C:\Windows\Logs\DISM\dism.log and try a local ISO source.Q What if SFC says it fixed files but the problem remains?â
Q Is it safe to run these commands more than once?â
Conclusion
To repair system file corruption in Windows 10 or Windows 11, start with an elevated terminal, run DISM RestoreHealth to repair the component store, restart, and then run SFC scannow to verify and replace protected system files. If the live system cannot be repaired, use offline SFC or DISM from Windows Recovery Environment with a matching Windows installation source.