Windows 8 and 8.1 Forums


Dism online restore health function gets error 0x80240021

  1. #1


    Posts : 6
    Windows 8.1 Professional 64-bit

    Dism online restore health function gets error 0x80240021


    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.
    Attached Thumbnails Attached Thumbnails DISM Powershell error message 2-16-14.png  
    Dism online restore health function gets error 0x80240021 Attached Files

      My System SpecsSystem Spec

  2. #2


    Posts : 1,360
    Windows 8.1 Enterprise


    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.
      My System SpecsSystem Spec

  3. #3


    Posts : 6
    Windows 8.1 Professional 64-bit


    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.
      My System SpecsSystem Spec

  4. #4


    Posts : 1,360
    Windows 8.1 Enterprise


    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.
    Dism online restore health function gets error 0x80240021 Attached Files
      My System SpecsSystem Spec

  5. #5


    Posts : 6
    Windows 8.1 Professional 64-bit


    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.
    Attached Thumbnails Attached Thumbnails winword error.png   ituneshelper error.png  
    Dism online restore health function gets error 0x80240021 Attached Files
      My System SpecsSystem Spec

  6. #6


    Posts : 1,360
    Windows 8.1 Enterprise


    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.com...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.
      My System SpecsSystem Spec

  7. #7


    Posts : 6
    Windows 8.1 Professional 64-bit


    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.
      My System SpecsSystem Spec

  8. #8


    Harrisonburg, Va.
    Posts : 10,488
    Windows 8.1.1 Pro with Media Center


    You can let sfc or dism run in the background.Just minimize them.

    They will slow things down a bit though.
      My System SpecsSystem Spec

  9. #9


    Posts : 6
    Windows 8.1 Professional 64-bit


    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.
    Attached Thumbnails Attached Thumbnails sfc results 2-17-14.png  
    Dism online restore health function gets error 0x80240021 Attached Files
      My System SpecsSystem Spec

  10. #10


    Harrisonburg, Va.
    Posts : 10,488
    Windows 8.1.1 Pro with Media Center


    That's good.
    SFC does actually fix things sometimes.
      My System SpecsSystem Spec

Page 1 of 2 12 LastLast
Dism online restore health function gets error 0x80240021
Related Threads
I am trying to repair corrupt files with DISM by going to Dism /Online /Cleanup-Image /RestoreHealth and it gives me the error below. How can I fix it? Microsoft Windows (c) 2013 Microsoft Corporation. All rights reserved.
DISM "Error: 0x80240021" in General Support
I was following the instructions provided to other users with the same error for this site. I have followed this posting specifically https://www.eightforums.com/performance-maintenance/41130-dism-online-restore-health-function-gets-error-0x80240021.html and have ran the DISM command followed by the...
restore health command in Performance & Maintenance
hello a few months ago i discovered the dism commands(scan health,restore health e.t.c)but i have an issue: 1)i run restore health command and every time appears that i have ''corrupted files'' and successfully repaired'.'why after runing the command 1 -2 or...
Hi Question before I proceed please : Have 2 hard drives (SSDs). Drive 1 : OS Win 8.1 for general web, office and junk running Drive 2 : OS Win 8.1 for tweaked hobby work; Audio recording etc Whilst I wish to not physically disconnect the drives on each boot. I would like to have the...
while runningsfcfix.exe it gives me this error CBS & SFC total detected corruption count: 1 also i have try running Dism /Online /Cleanup-Image /RestoreHealth and it gives me a error 0x800f081f in addition i try running the windows 8.1 cd startup repair and it could not repair it. how can...
I am trying to use dism/online/cleanup-image/restorehealth tool in an elevated command prompt to fix corrupt files that sfc/scannow is unable to repair. I keep getting this error message below: Microsoft Windows (c) 2012 Microsoft Corporation. All rights reserved....
I installed Win 8 Pro on my Win 7 Ultimate desktop. Can I go back to Win 7 by any means?
Eight Forums Android App Eight Forums IOS App Follow us on Facebook