If your Windows 10 became broken, it can be related to corruption in the Component Store where system files are stored. The Component store is a core feature of Windows 10 which stores all of the files related to the OS grouped by components and as hardlinks. Some files are shared between two components and they are all hardlinked to the system32 folder. When the OS is serviced, the component store is updated. The Component Store is part of the Windows Imaging and Servicing stack. In this article, we'll see how to fix Windows 10 if it cannot be updated or if certain system components are damaged.
There is a special console tool called DISM which ships with Windows 10 by default. It can be used to fix Windows Component Store corruption. It is especially useful when the usual command "sfc /scannow" cannot repair damaged system files.
Before you proceed, you need to know that the DISM tool writes the following log files:
They can be used to analyze errors and see completed operations.
To Fix Windows 10 using DISM, do the following.
Tip: Here's how to tweak your PC to ensure top performance for a specific type of task, be it gaming, document work or something else.
- Open an elevated command prompt.
- Type or copy-paste the following command:
Dism /Online /Cleanup-Image /CheckHealth
The key option here is CheckHealth. Use it to check if some process has marked the Component Store as corrupted and whether the corruption is repairable. This command is not supposed to fix any issues. It only reports about problems if they are present and if the CBS store is flagged. This command doesn't create a log file.
- Alternatively, the command Dism /Online /Cleanup-Image /ScanHealth can be used to check the component store for corruption. It takes a significantly longer amount of time than the CheckHealth option, but creates a log file.
- Finally, to repair the component store, you should use the following command:
Dism /Online /Cleanup-Image /RestoreHealth
The DISM tool started with the /RestoreHealth option will scan the component store for corruption and perform the required repair operations automatically. It will create a log file. The whole process can take several hours, so be patient. On hard drives, it will take longer compared to an SSD.
In addition, you can specify the WIM file which can be used to restore corrupted system files. The command looks as follows:
Dism /Online /Cleanup-Image /RestoreHealth /Source:wim:Full Path to install.wim file:<Index>
In the command above, substitute the full path to the WIM file properly. Also, replace the <Index> portion in the command above with the actual index number for the edition contained in the WIM file.
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:D:\sources\install.wim
Replace the D:\sources\ portion with the actual path to your WIM file.