Solved Dism online restore health function gets error 0x80240021

sidv88

New Member
Messages
6
Hi,

I have a desktop computer running Windows 8.1 Pro 64-bit. My computer suffered from an improper shutdown during a power outage. I am getting multiple error messages on logging in, and the sfc /scannow command shows several corrupt files, including msvcr80.dll and multiple others, preventing programs like Microsoft Word from running properly.

I am getting the message after running sfc /scannow in an elevated command prompt that
Windows Resource Protection found corrupt files but was unable to fix some of them. Details are included in the CBS.Log %WinDir%\Logs\CBS\CBS.log. I used the findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log >"%userprofile%\Desktop\sfcdetails.txt" command to get this log outputted to a sfcdetails.txt log, and it shows which files are corrupt.


I then decided to turn to DISM, in an elevated command prompt, to ensure the component store was good, so that SFC can fix the files. This is where I am getting lost.

Dism /Online /Cleanup-Image /CheckHealth states that: The component store is repairable. However, when I run Dism /Online /Cleanup-Image /RestoreHealth , I am told (after some minutes of it running) that DISM failed, no operation was taken, with an error code of 0x80240021.

Looking at the dism.log file, I am seeing a very long log. These are the initial lines:

[2344] Caller did not request sparse mount
[2344] Mounting new image.
Wim: [\\?\GLOBALROOT\device\harddisk0\partition1\Recovery\WindowsRE\Winre.wim]
Image Index: [1]
Mount Path: [C:\WINDOWS\TEMP\35f47719-b059-4f12-b5ee-101b2768bade]
[2344] Wimserv process started for guid 5cf84338-3869-464a-8cdf-3266fc2b6432. Id is 1008
[1008] ImageUnmarshallHandle: Reconstituting wim at \\?\GLOBALROOT\device\harddisk0\partition1\Recovery\WindowsRE\Winre.wim.
[1008] Mounted image at C:\WINDOWS\TEMP\35f47719-b059-4f12-b5ee-101b2768bade.
[2344] [0x8007007b] FIOReadFileIntoBuffer:(1415): The filename, directory name, or volume label syntax is incorrect.
[2344] [0xc142011c] UnmarshallImageHandleFromDirectory:(511)
[2344] [0xc142011c] WIMGetMountedImageHandle:(2568)
[2344] [0x8007007b] FIOReadFileIntoBuffer:(1415): The filename, directory name, or volume label syntax is incorrect.
[2344] [0xc142011c] UnmarshallImageHandleFromDirectory:(511)
[2344] [0xc142011c] WIMGetMountedImageHandle:(2568)
[2344] ImageUnmarshallHandle: Reconstituting wim at \\?\GLOBALROOT\device\harddisk0\partition1\Recovery\WindowsRE\Winre.wim.
[2344] ImageUnmarshallHandle: Reconstituting wim at \\?\GLOBALROOT\device\harddisk0\partition1\Recovery\WindowsRE\Winre.wim.
[2344] ImageUnmarshallHandle: Reconstituting wim at \\?\GLOBALROOT\device\harddisk0\partition1\Recovery\WindowsRE\Winre.wim.
[2344] ImageUnmarshallHandle: Reconstituting wim at \\?\GLOBALROOT\device\harddisk0\partition1\Recovery\WindowsRE\Winre.wim.
[2344] ImageUnmarshallHandle: Reconstituting wim at \\?\GLOBALROOT\device\harddisk0\partition1\Recovery\WindowsRE\Winre.wim.
[2344] ImageUnmarshallHandle: Reconstituting wim at \\?\GLOBALROOT\device\harddisk0\partition1\Recovery\WindowsRE\Winre.wim.
[2344] ImageUnmarshallHandle: Reconstituting wim at \\?\GLOBALROOT\device\harddisk0\partition1\Recovery\WindowsRE\Winre.wim.
[1008] Received unmount request for image with guid 5cf84338-3869-464a-8cdf-3266fc2b6432.
[1008] Unmount for image at C:\WINDOWS\TEMP\35f47719-b059-4f12-b5ee-101b2768bade complete.


From what I can make, some file name or directory is incorrect? I have attached my dism.log file (saved as a .doc file for attachment purposes), my sfcdetails.txt log (obtained from the sfc /scannow function), and a screenshot of the Repair-WindowsImage -Online -RestoreHealth error message when I run it in PowerShell. I would appreciate any input on how I can run DISM correctly to fix my component store. Thank you.
 

Attachments

  • sfcdetails.txt
    sfcdetails.txt
    81.6 KB · Views: 408
  • dism.doc
    dism.doc
    68.5 KB · Views: 508
  • DISM Powershell error message 2-16-14.png
    DISM Powershell error message 2-16-14.png
    12.3 KB · Views: 712
Start with running chkdsk to scan & repair the file system along with any potential damaged sectors.

Open an elevated command prompt, Type: chkdsk /r > Press Y to run the scan on reboot.

Reboot the computer then run sfc & dism again.

If the system is unable to repair file corruption restore the computer using System Restore.
 
I have been running chkdsk /r for the past 3 hours. It is a 2 TB drive, so I assume it will take a long time. Hopefully it will be done either today or tomorrow, then I will run sfc and dism again to see if the results are better.

Unfortunately the power outage that damaged the files also seems to have affected the previous system restores. The previous system restore points dated before the outage are no longer there, so system restore may not be an option.
 
so I assume it will take a long time. Hopefully it will be done either today or tomorrow, then I will run sfc and dism again to see if the results are better.

Correct, chkdsk will take some time to complete. Although the good news is that once its finished you won't have to run it again.

I have attached a script for you which will run Dism & SFC for you. All you need to do is right click the file and select Run as Administrator.

The script will run through 3 phases. After each one has completed you'll be prompted to press any key.

Finally, run the Collect.bat file. This will create a folder on the Desktop called Logs. Right click the folder and select Send To > Compressed Folder. Please attach the folder to your next post.
 

Attachments

ectech,

Thank you so much! I ran the DISM.bat and Collect.bat programs, and most of the errors have been fixed. After the first 2 phases of DISM.bat ran, I got a message saying the component store was repaired. The 3rd phase, sfc /scannow, seemed to fix most of the errors, however I still got the
Windows Resource Protection found corrupt files but was unable to fix some of them. Details are included in the CBS.Log %WinDir%\Logs\CBS\CBS.log. message. However, looking at the sfcdetails.txt log, it did seem like the files were fixed, so I'm not 100% sure what files were unfixable. I have attached the Logs.zip file containing the logs to this message like you said.

Still, my computer seems to be working much better now, thank you! There are only 2 dll errors I am getting on startup: one seems to be related to an Apple/itunes file and the other affects Microsoft Office (MS Word still won't run). (screenshots attached) However, these may be due to non-system files and I will try reinstalling MS Office and Itunes to see if it fixes those problems.

I may run sfc /scannow one or two more times to ensure everything is fixed. I appreciate the help provided here very much.
 

Attachments

  • winword error.png
    winword error.png
    7.6 KB · Views: 325
  • ituneshelper error.png
    ituneshelper error.png
    6.8 KB · Views: 316
Glad to see we are making progress.. :)

The first image you posted looks to me like malware. Here are a few programs to help you clean up your system..

1) Awdcleaner - http://download.bleepingcomputer.co...ecurity-utilities/a/adwcleaner/AdwCleaner.exe

2) Junkware Removal Tool - http://thisisudax.org/downloads/JRT.exe

3) Malwarebytes' - Download Malwarebytes Anti-Malware 1.75 - Download - FileHippo.com

Next, use MajorGeeks.com - MajorGeeks to remove iTunes, Bonjour & Apple Application Support. Then reinstall iTunes.

In the meantime I will prepare instructions to repair the damaged files sfc can not fix.
 
I keep my PC protected with antispyware and antivirus. I'm not sure if the MS Word error message is caused by malware, but I just did a repair install of Microsoft Office and MS Word and the Office Programs are working again, with no error message of the sort I posted earlier.

I reinstalled iTunes and now also no longer get error messages related to it regarding AppleVersions.dll (the ituneshelper screenshot error message is gone now).

There are now no error messages when starting up/rebooting the computer, and on the surface the PC seems exactly as it was before the power outage. I have set up an uninterruptible power supply to ensure that this sort of power outage incident does not occur in the future.

I have not had a chance to run sfc /scannow again to see if there is anything being missed, but will try to do so when I can. Thanks for your help in the matter.
 
I ran sfc /scannow again, and got the result:
Windows Resource Protection found corrupt files and successfully repaired them. Details are included in the CBS.Log WinDir\Logs\CBS\CBS.log.

I have attached a screenshot of the scan as well as the log (sfcdetails.txt). It seems, for now, that all corrupted system files have been successfully fixed, going by the scan results.
 

Attachments

  • sfc results 2-17-14.png
    sfc results 2-17-14.png
    10.3 KB · Views: 436
  • sfcdetails.txt
    sfcdetails.txt
    61.2 KB · Views: 295
Everything contained in the log files looks to be repaired. If your not having any more issues you can make this topic solved.
 
Everything contained in the log files looks to be repaired. If your not having any more issues you can make this topic solved.

I haven't had any issues so far. The latest sfc scan I just ran (attached) shows a clean system; will mark this topic as solved.

Thanks for your help and input!
 

Attachments

  • sfc results 2-17-14 second scan.png
    sfc results 2-17-14 second scan.png
    8.3 KB · Views: 278
Edit: I ran into the same error. I've tried everything usual but nothing worked. It appeared it was Windows update the culprit. I looked for "troubleshooter" then "Windows Update". Started the thing... Windows asked to troubleshoot in admin mode... I said yes... Then Windows fixed Windows update (sorry I don't have a screenshot). Then I did restorehealth and 100 % done success!

The thing is that online DISM needs Win Update to be successful!

Hope this will help!
 
Back
Top