Windows Repair

How to Check Integrity and Repair System Files in Windows 10 / 11

Use SFC and DISM correctly to detect corrupted protected files, repair the Windows component store, and restore system stability without reinstalling Windows.

Windows 10 Windows 11 SFC DISM WinRE
📌
Contents
Article navigation
  1. When you should check system file integrity
  2. Before you run SFC or DISM
  3. How to run System File Checker
  4. How to repair Windows with DISM
  5. Offline repair from Windows Recovery Environment
  6. How to read SFC and DISM results
  7. What to do if repair fails
  8. Frequently asked questions

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.

Step 01

Open an elevated terminal

Run Command Prompt, PowerShell, or Windows Terminal as administrator.

Required
Step 02

Repair the component store

Use DISM to restore the Windows image that SFC relies on.

Recommended first
Step 03

Scan protected system files

Use SFC to replace corrupted or missing protected files.

Final check

When 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.

âš™ī¸
Windows components fail
Settings, Start menu, search, Windows Update, Microsoft Store, or built-in apps stop working normally.
đŸ’Ĩ
Random errors and crashes
You see DLL errors, app crashes, blue screens, or services that start and stop without a clear reason.
🧩
Update or repair fails
Feature updates, cumulative updates, optional features, or Windows repair tools fail repeatedly.
â„šī¸
Important SFC and DISM repair Windows system files. They do not restore deleted personal files, remove all malware, fix a failing SSD/HDD, or repair third-party applications by themselves.

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.

  1. Save open files and close unnecessary applications.
  2. Connect a laptop to power so the repair process is not interrupted.
  3. Make sure the system drive has free space, ideally several gigabytes.
  4. Use an administrator account.
  5. 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.

âš ī¸
Do not interrupt repairs DISM or SFC can appear stuck for several minutes. Avoid closing the terminal, forcing a shutdown, or disconnecting power while the command is still running.

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.
✅
Best practice Even if SFC says it repaired files, restart Windows and run 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
🔄
Recommended sequence For stubborn corruption, use this order: DISM RestoreHealth → restart → SFC scannow → restart → SFC scannow again.

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
âš ī¸
Match the Windows version The repair source should match the installed Windows edition, language, and build as closely as possible. A mismatched ISO may cause DISM source errors.

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

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

Tip: If the log repeatedly mentions missing source files, use a Windows ISO as the repair source instead of relying only on Windows Update.

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
⛔
Back up first If the drive shows SMART warnings, bad sectors, clicking sounds, repeated freezes, or disappearing files, back up important data before running repeated repair attempts.

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?⌄
For a quick check, running 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?⌄
No. SFC focuses on protected Windows system files. It does not remove documents, photos, browser profiles, or personal folders. Still, keeping a backup is recommended before any repair work on an unstable PC.
Q Why does DISM get stuck at a percentage?⌄
DISM can pause for a long time at certain percentages while it processes components. Wait before assuming it is frozen. If it fails with a specific error code, check C:\Windows\Logs\DISM\dism.log and try a local ISO source.
Q What if SFC says it fixed files but the problem remains?⌄
Restart the PC, run SFC again, and then investigate other causes such as drivers, Windows Update, user profile corruption, malware, app-specific files, or disk errors.
Q Is it safe to run these commands more than once?⌄
Yes. Running SFC and DISM more than once is common during repair. However, if corruption keeps returning, check disk health and recent driver or update changes instead of repeating the same commands indefinitely.

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.