What's new

DISM - Fixing Component Store Corruption in Windows 8

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

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


CBS.log.jpg

DISM.log.jpg

Tip   Tip
If you get an error like below when running a DISM command in an option below, then run the command below and try again afterwards.

Dism.exe /online /Cleanup-Image /StartComponentCleanup


Note   Note
Error: 0x80240021

Failure DISM. No operation was performed.


CONTENTS:

  • Option One: To Run "DISM /Cleanup-Image" tool in an Elevated Command Prompt
  • Option Two: To Run "DISM /Cleanup-Image" tool in an Elevated PowerShell






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


1. Open an elevated command prompt.

2. Do step3, step 4, step 5, or step 6 below for what DISM command you would like to use.


3. To Use DISM /CheckHealth Command
Note   Note
You would use /CheckHealth to only check whether the image has been flagged as corrupted by a failed process and whether the corruption can be repaired. This is just a quick way to see if corruption currently exists, and to inform you if there is corruption. This does not fix anything or create a log. This will finish running almost instantly.



A) In the elevated command prompt, copy and paste the command below, press Enter, and go to step 7 below. (see screenshot below)

:ar: Dism /Online /Cleanup-Image /CheckHealth

CMD_CheckHealth.jpg



4. To Use DISM /ScanHealth Command
Note   Note
You would use /ScanHealth to scan the image for component store corruption. This option does not fix any corruption. It only checks for component store corruption and records that corruption to the log file. This can take around 5-10 minutes to finish. It will stay at 20% for a while before continuing.




A) In the elevated command prompt, copy and paste the command below, press Enter, and go to step 7 below. (see screenshot below)

:ar: Dism /Online /Cleanup-Image /ScanHealth

CMD_ScanHealth.jpg



5. To Use DISM /RestoreHealth Command
Note   Note
(recommended) You would use /RestoreHealth to scan the image for component store corruption, perform repair operations automatically, and records that corruption to the log file. This can take around 10-15 minutes up to a few hours to finish depending on the level of corruption. It will stay at 20% for a while before continuing.




A) In the elevated command prompt, copy and paste the command below, press Enter, and go to step 7 below. (see screenshot below)

:ar: Dism /Online /Cleanup-Image /RestoreHealth

CMD_RestoreHealth.jpg



6. To Use DISM /RestoreHealth /Source:wim Command
Note   Note
You would use /Source with /RestoreHealth to specify the location of an install.wim file as the source of known good versions of files that can be used for the repair. This can take around 10-15 minutes up to a few hours to finish depending on the level of corruption. It will stay at 20% for a while before continuing.

This can be useful if step 5 above was not able to repair the Windows image (component store).


The install.wim file will be in the Sources folder of a mounted Windows 8.1 ISO file.





A) In the elevated command prompt, type the command below you want to use, press Enter, and go to step 7 below. (see screenshot below)

:ar: Dism /Online /Cleanup-Image /RestoreHealth /Source:wim:Full Path to install.wim file:1

OR

(To prevent DISM from using Windows Update for online images)
:ar: Dism /Online /Cleanup-Image /RestoreHealth /Source:wim:Full Path to install.wim file:1 /limitaccess

For example:

:ar: Dism /Online /Cleanup-Image /RestoreHealth /Source:wim:D:\sources\install.wim:1 /limitaccess

DISM_RestoreHealth_wim_sources.png



7. If you did step 5 or step 6 above, it is recommended to restart the computer to fully apply.






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


1. Open an elevated PowerShell.

2. Do step3, step 4, step 5, or step 6 below for what DISM command you would like to use.


3. To Use DISM /CheckHealth Command
Note   Note
You would use /CheckHealth to only check whether the image has been flagged as corrupted by a failed process and whether the corruption can be repaired. This is just a quick way to see if corruption currently exists, and to inform you if there is corruption. This does not fix anything or create a log. This will finish running almost instantly.



A) In the elevated command prompt, copy and paste the command below, press Enter, and go to step 7 below. (see screenshot below)

:arrow: Repair-WindowsImage /Cleanup-Image /CheckHealth

PowerShell_CheckHealth.jpg



4. To Use DISM /ScanHealth Command
Note   Note
You would use /ScanHealth to scan the image for component store corruption. This option does not fix any corruption. It only checks for component store corruption and records that corruption to the log file. This can take around 5-10 minutes to finish. It will stay at 20% for a while before continuing.



A) In the elevated command prompt, copy and paste the command below, press Enter, and go to step 7 below. (see screenshot below)

:arrow: Repair-WindowsImage /Cleanup-Image /ScanHealth

PowerShell_ScanHealth.jpg



5. To Use DISM /RestoreHealth Command
Note   Note
(recommended) You would use /RestoreHealth to scan the image for component store corruption, perform repair operations automatically, and records that corruption to the log file. This can take around 10-15 minutes up to a few hours to finish depending on the level of corruption. It will stay at 20% for a while before continuing.




A) In the elevated command prompt, copy and paste the command below, press Enter, and go to step 7 below. (see screenshot below)

:arrow: Repair-WindowsImage /Cleanup-Image /RestoreHealth

PowerShell_RestoreHealth.jpg



6. To Use DISM /RestoreHealth /Source:wim Command
Note   Note
You would use /Source with /RestoreHealth to specify the location of an install.wim file as the source of known good versions of files that can be used for the repair. This can take around 10-15 minutes up to a few hours to finish depending on the level of corruption. It will stay at 20% for a while before continuing.

This can be useful if step 5 above was not able to repair the Windows image (component store).


The install.wim file will be in the Sources folder of a mounted Windows 8.1 ISO file.





A) In the elevated command prompt, type the command below you want to use, press Enter, and go to step 7 below. (see screenshot below)

:ar: Dism /Online /Cleanup-Image /RestoreHealth /Source:wim:Full Path to install.wim file:1

OR

(To prevent DISM from using Windows Update for online images)
:ar: Dism /Online /Cleanup-Image /RestoreHealth /Source:wim:Full Path to install.wim file:1 /limitaccess

For example:

:ar: Dism /Online /Cleanup-Image /RestoreHealth /Source:wim:D:\sources\install.wim:1 /limitaccess

PowerShell_DISM_RestoreHealth_wim_sources.png



7. If you did step 5, step 6, or step 7 above, it is recommended to restart the computer to fully apply.





That's it,
Shawn


 

Attachments

  • Command_Prompt.png
    Command_Prompt.png
    5.7 KB · Views: 8
Last edited by a moderator:

Brink

Administrator
Administrator
mvp
I'm glad it could help Noobiel, and welcome to Eight Forums. :)
 

My Computer

System One

  • OS
    64-bit Windows 10
    Name
    Shawn Brink
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Custom self built
    CPU
    Intel i7-8700K OC'd to 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    16 GB (8GBx2) G.SKILL TridentZ DDR4 3200 MHz
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    3 x 27" Asus VE278Q
    Screen Resolution
    1920x1080
    Hard Drives
    1TB Samsung 970 EVO Plus M.2,
    250GB Samsung 960 EVO M.2,
    6TB WD Black WD6001FZWX
    8TB WD MyCloudEX2Ultra NAS
    PSU
    OCZ Series Gold OCZZ1000M 1000W
    Case
    Thermaltake Core P3
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master
    Internet Speed
    1 Gb/s Download and 35 Mb/s Upload
    Browser
    Internet Explorer 11
    Antivirus
    Malwarebyte Anti-Malware Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    Linksys EA9500 router,
    Arris SB8200 cable modem,
    APC SMART-UPS RT 1000 XL - SURT1000XLI,
    Lumia 1520 phone
    State/Region Flag
    us oklahoma

Brink

Administrator
Administrator
mvp
Hello fresurreccion, and welcome to Eight Forums. :)

If you haven't already, see if SFC may be able to repair the file after running the DISM command in step 5 of Option One.
 

My Computer

System One

  • OS
    64-bit Windows 10
    Name
    Shawn Brink
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Custom self built
    CPU
    Intel i7-8700K OC'd to 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    16 GB (8GBx2) G.SKILL TridentZ DDR4 3200 MHz
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    3 x 27" Asus VE278Q
    Screen Resolution
    1920x1080
    Hard Drives
    1TB Samsung 970 EVO Plus M.2,
    250GB Samsung 960 EVO M.2,
    6TB WD Black WD6001FZWX
    8TB WD MyCloudEX2Ultra NAS
    PSU
    OCZ Series Gold OCZZ1000M 1000W
    Case
    Thermaltake Core P3
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master
    Internet Speed
    1 Gb/s Download and 35 Mb/s Upload
    Browser
    Internet Explorer 11
    Antivirus
    Malwarebyte Anti-Malware Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    Linksys EA9500 router,
    Arris SB8200 cable modem,
    APC SMART-UPS RT 1000 XL - SURT1000XLI,
    Lumia 1520 phone
    State/Region Flag
    us oklahoma

Brink

Administrator
Administrator
mvp
Correct. Afterwards, try SFC again to see if it can then repair the files.
 

My Computer

System One

  • OS
    64-bit Windows 10
    Name
    Shawn Brink
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Custom self built
    CPU
    Intel i7-8700K OC'd to 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    16 GB (8GBx2) G.SKILL TridentZ DDR4 3200 MHz
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    3 x 27" Asus VE278Q
    Screen Resolution
    1920x1080
    Hard Drives
    1TB Samsung 970 EVO Plus M.2,
    250GB Samsung 960 EVO M.2,
    6TB WD Black WD6001FZWX
    8TB WD MyCloudEX2Ultra NAS
    PSU
    OCZ Series Gold OCZZ1000M 1000W
    Case
    Thermaltake Core P3
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master
    Internet Speed
    1 Gb/s Download and 35 Mb/s Upload
    Browser
    Internet Explorer 11
    Antivirus
    Malwarebyte Anti-Malware Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    Linksys EA9500 router,
    Arris SB8200 cable modem,
    APC SMART-UPS RT 1000 XL - SURT1000XLI,
    Lumia 1520 phone
    State/Region Flag
    us oklahoma

Brink

Administrator
Administrator
mvp
Great news. :party:
 

My Computer

System One

  • OS
    64-bit Windows 10
    Name
    Shawn Brink
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Custom self built
    CPU
    Intel i7-8700K OC'd to 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    16 GB (8GBx2) G.SKILL TridentZ DDR4 3200 MHz
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    3 x 27" Asus VE278Q
    Screen Resolution
    1920x1080
    Hard Drives
    1TB Samsung 970 EVO Plus M.2,
    250GB Samsung 960 EVO M.2,
    6TB WD Black WD6001FZWX
    8TB WD MyCloudEX2Ultra NAS
    PSU
    OCZ Series Gold OCZZ1000M 1000W
    Case
    Thermaltake Core P3
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master
    Internet Speed
    1 Gb/s Download and 35 Mb/s Upload
    Browser
    Internet Explorer 11
    Antivirus
    Malwarebyte Anti-Malware Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    Linksys EA9500 router,
    Arris SB8200 cable modem,
    APC SMART-UPS RT 1000 XL - SURT1000XLI,
    Lumia 1520 phone
    State/Region Flag
    us oklahoma

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top