Saturday, July 19, 2014

How to Use DISM to Fix Component Store Corruption in Windows 8 and Windows Server 2012


information   Information
One of the most used tools when fixing corruption for Vista, Windows 7, Windows Server 2008 and Windows Server 2008 R2 was the System Update and Readiness Tool (KB947821), commonly called CheckSUR. The CheckSUR tool was an excellent way for most people to see what corruption had happened on their store, and potentially fix that corruption if the tool contained the payload to do so.

In Windows 8/8.1 and Windows Server 2012, this has changed. It’s called Inbox Corruption Repair and it brings the functionality of CheckSUR into Windows rather than requiring a separate download to get the utility like you do now. This is exposed in two ways, the first is really unseen by the end user and happens when Windows detects a corrupted state when attempting to install fixes via Windows Update. When this happens, Windows fix the corruption silently and then re-install the prior packages. The manual way to use this tool is via DISM (Deployment Imaging and Servicing Management). The way this is exposed is via the DISM /Cleanup-Image functionality.

If a Windows image (Windows component store) becomes unserviceable, you can use the Deployment Imaging and Servicing Management (DISM) tool to update the files and correct the problem.

For example:

  • To use to fix Windows component store corruption when a SFC /SCANNOW command is unable to repair corrupted system files because the store (source) is corrupted, then run the SFC command again.
  • To use to fix Windows component store corruption when the same Windows Updates continue to appear to be available to install even though they already show successfully installed in update history.


For more information, see:




This tutorial will show you how to do an Inbox Corruption Repair with the DISM /Cleanup-Image tool to fix component store corruption in Windows 8 and Windows Server 2012.

You must be signed in as an administrator to be able to do an Inbox Corruption Repair with the Deployment Imaging and Servicing Management (DISM) tool.

Note   Note
The DISM /Cleanup-Image tool saves it's log files in the file locations below. To be able to view these logs, you would need to copy them from the locations below to your desktop, then open them from your desktop.

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

C:\Windows\Logs\DISM\dism.log



Click image for larger version

Click image for larger version





OPTION ONE
To Run "DISM /Cleanup-Image" tool in an Elevated Command Prompt

1. Open an elevated command prompt.

2. In the elevated command prompt, copy and paste the command below that you want to use.

Note   Note
Available Switch Options:

/CheckHealth
- This switch option only checks to see if a component corruption marker is already present in the registry. It is just a quick way to see if corruption currently exists, and to inform you if there is corruption. It does not fix anything or create a log. This should be finished almost instantaneous.

/ScanHealth - This switch option does not fix any corruption. It only checks for component store corruption and records that corruption to the log file. This is useful for only logging what, if any, corruption exists. This should take around 5-10 minutes to finish.

/RestoreHealth - (recommended) This switch option checks for component store corruption, records the corruption to the log file, and FIXES the image corruption using Windows Update. This should take around 10-15 minutes up to about an hour to finish depending on the level of corruption.


Dism /Online /Cleanup-Image /CheckHealth

Dism /Online /Cleanup-Image /ScanHealth

Dism /Online /Cleanup-Image /RestoreHealth

3. When finished, it is recommended to restart the PC to configure any updates that may have been affected by this.

NOTE: Some scans may take a while to finish and may seem like it's hung at times, but let it sit running until finished.

Click image for larger version

Click image for larger version

Click image for larger version






OPTION TWO
To Run "DISM /Cleanup-Image" tool in an Elevated PowerShell

1. Open an elevated PowerShell.

2. In the elevated PowerShell, copy and paste the command below that you want to use.

Note   Note
Available Switch Options:

-CheckHealth
- This switch option only checks to see if a component corruption marker is already present in the registry. It is just a quick way to see if corruption currently exists, and to inform you if there is corruption. It does not fix anything or create a log. This should be finished almost instantaneous.

-ScanHealth - This switch option does not fix any corruption. It only checks for component store corruption and records that corruption to the log file. This is useful for only logging what, if any, corruption exists. This should take around 5-10 minutes to finish.

-RestoreHealth - (recommended) This switch option checks for component store corruption, records the corruption to the log file, and FIXES the image corruption using Windows Update. This should take around 10-15 minutes up to about an hour to finish depending on the level of corruption.


Repair-WindowsImage -Online -CheckHealth

Repair-WindowsImage -Online -ScanHealth

Repair-WindowsImage -Online -RestoreHealth

3. When finished, it is recommended to restart the PC to configure any updates that may have been affected by this.

NOTE: Some scans may take a while to finish and may seem like it's hung at times, but let it sit running until finished.

Click image for larger version

Click image for larger version

Click image for larger version





That's it,
Shawn


Related Tutorials

No comments:

Post a Comment