When Windows starts behaving strangely — settings pages that will not open, updates that fail repeatedly, built-in apps that crash — damaged system files are a common cause. Windows includes two tools to fix them:

  • DISM (Deployment Image Servicing and Management) repairs the component store, the local copy of system files that Windows uses for repairs.
  • SFC (System File Checker) compares protected system files with that component store and replaces any that are damaged.

Because SFC relies on the component store, run DISM first, then SFC.

Before you start

  • Sign in with an administrator account.
  • Connect to the internet. By default DISM downloads clean files from Windows Update.
  • Save your work. The process can take 15–30 minutes and is CPU-intensive.

Step 1: Check the component store

CheckHealth is a quick test that reports whether corruption has already been detected:

CMD
DISM /Online /Cleanup-Image /CheckHealth

For a deeper scan, use ScanHealth. It takes several minutes and checks every component:

CMD
DISM /Online /Cleanup-Image /ScanHealth

Step 2: Repair the component store

If either scan reports problems — or you simply want to be thorough — run RestoreHealth:

CMD
DISM /Online /Cleanup-Image /RestoreHealth

Progress may appear to stall at 20% or 62% for a long time. That is normal; let it finish.

Repairing without Windows Update

If the PC cannot reach Windows Update, point DISM at installation media for the same Windows version and edition. Mount the ISO (for example as drive D:) and run:

CMD
DISM /Online /Cleanup-Image /RestoreHealth /Source:wim:D:\sources\install.wim:1 /LimitAccess

The number after the file path is the image index. List the editions in the file with DISM /Get-WimInfo /WimFile:D:\sources\install.wim. If your media contains install.esd instead, use the esd: prefix.

Step 3: Run System File Checker

CMD
sfc /scannow

When it finishes, you will see one of these results:

MessageWhat it means
Windows Resource Protection did not find any integrity violations.System files are fine. Look elsewhere — drivers, apps or hardware.
Windows Resource Protection found corrupt files and successfully repaired them.Restart the PC and check whether the problem is gone.
Windows Resource Protection found corrupt files but was unable to fix some of them.Run Step 2 again, restart, then run sfc /scannow once more.
Windows Resource Protection could not perform the requested operation.Run SFC from Safe Mode or the Windows Recovery Environment.

Step 4: Review the logs

SFC writes its results to %windir%\Logs\CBS\CBS.log. That file is large, so extract just the SFC entries to your desktop:

CMD
findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log > "%userprofile%\Desktop\sfcdetails.txt"

DISM writes its own log to %windir%\Logs\DISM\dism.log.

Quick reference

CMD
DISM /Online /Cleanup-Image /RestoreHealth
sfc /scannow

Run them in that order, from an elevated terminal, and restart afterwards.