Repair Windows 10 Using DISM and SFC

If the system files in your Windows 10 computer become corrupt and the System File Checker (SFC /scannow) is unable to reinstate the critical system files, it’s due to corruption of Component Store located at the C:\Windows\WinSxS directory. This directory contains the files needed for SFC utility to restore missing or damaged system files. The Component store stores all the Windows system files grouped by components and as hard links.

This post tells you how to fix Windows 10 if some system files or the component store are damaged.

There is a console tool named DISM which ships with Windows 10 by default. DISM is used to fix Windows Component Store corruption, especially in situations where the System File Checker doesn’t help.

The DISM tool writes the following log files which can be used to analyze the operation status and errors:

  • C:\Windows\Logs\CBS\CBS.log
  • C:\Windows\Logs\DISM\DISM.log

Repair Windows 10 Using DISM

To fix Windows 10 using DISM, use the following steps:

1. Open an elevated command prompt.

2. Type the following command and press ENTER:

Dism /Online /Cleanup-Image /CheckHealth

dism online checkhealth

The /CheckHealth is used to check whether the image has been flagged as corrupted by a failed process and whether the corruption can be repaired. Note that this command doesn’t fix anything, only reports the problems if any.

Alternately, you can use the /ScanHealth command (below) to check for component store for corruption.

Dism /Online /Cleanup-Image /ScanHealth

dism online scanhealth

It takes a significantly more extended amount of time than the CheckHealth option, but using this switch may be doing a thorough test, and also writes the results to a log file.

To repair the component store, use the following command:

Dism /Online /Cleanup-Image /RestoreHealth

dism online restorehealth

The above command scans for component store corruption and does the repair operations automatically, writing the operational results to a log file. This process takes a long time to complete.

Additionally, you can mention the WIM file which can be used to restore corrupted system files. Use this syntax:

Dism /Online /Cleanup-Image /RestoreHealth /Source:wim:Full Path to install.wim file:<Index>

Replace the <Index> placeholder in the above command with the actual index number for the Edition (“Home”, “Pro” etc) contained in the WIM file.

For example:

Dism /Online /Cleanup-Image /RestoreHealth /Source:wim:D:\Sources\install.wim:1

You can list available editions and their indexes with the following command:

dism /get-wiminfo /wimfile:F:\sources\install.wim

(Replace the F:\sources\ portion with the actual path to your WIM file.)

find windows build version from iso file
Running DISM command on install.wim or install.esd

For more information, see article Find the Windows version, build and edition from ISO or DVD

Follow up with the System File Checker to restore the critical system files, using the following command from an elevated command prompt:

sfc /scannow

For more information, refer Microsoft articles Use the System File Checker tool to repair missing or corrupted system files and How to analyze the log file entries that the Microsoft Windows Resource Checker (SFC.exe) program generates

Hope that helps repair the component store and restore the Windows system files.

One small request: If you liked this post, please share this?

One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:
  • Pin it!
  • Share it to your favorite blog + Facebook, Reddit
  • Tweet it!
So thank you so much for your support, my reader. It won't take more than 10 seconds of your time. The share buttons are right below. :)

About the author

Ramesh Srinivasan founded back in 2005. He is passionate about Microsoft technologies and he has been a Microsoft Most Valuable Professional (MVP) for 10 consecutive years from 2003 to 2012.

5 thoughts on “Repair Windows 10 Using DISM and SFC”

Leave a Comment