How to Run DISM Commands in Win PE (Boot Failure)?

Page 1 of 2 12 LastLast

  1. Posts : 5
    Win 10 Pro
       #1

    How to Run DISM Commands in Win PE (Boot Failure)?


    I am having boot issues on my PC and so I need to fix the component store since I think the Windows files are corrupted.

    Usually, in Windows, I can just run dism /Online /Cleanup-Image /RestoreHealth and it works fine.

    However, since I can't boot into Windows, I have to go into CMD in Win PE (using installation media), but there I can't use the /Online tag since we can't go online.

    I can run /ScanHealth or /CheckHealth and that works fine but the moment I try to run /RestoreHealth, it says 'Error 0x800f081f: The source files could not be found' after around 55%.

    I extracted the install.wim file to the root of the C:\ drive and then pointed to it using dism /Image:C:\ /Cleanup-Image /RestoreHealth /Source:C:\install.wim and even that gives me the Error 0x800f081f.

    I'm running Win 10 19042.662 and I created a bootable USB with the same version - copied the install.wim file from there and it still gives me the error.

    Can anyone help?

    Thanks in advance.
      My Computer


  2. Posts : 197
    Win10 Pro x64 / WinServer 2016 Essentials
       #2

    Suzerain said:
    I am having boot issues on my PC and so I need to fix the component store since I think the Windows files are corrupted.

    Usually, in Windows, I can just run dism /Online /Cleanup-Image /RestoreHealth and it works fine.

    However, since I can't boot into Windows, I have to go into CMD in Win PE (using installation media), but there I can't use the /Online tag since we can't go online.

    I can run /ScanHealth or /CheckHealth and that works fine but the moment I try to run /RestoreHealth, it says 'Error 0x800f081f: The source files could not be found' after around 55%.

    I extracted the install.wim file to the root of the C:\ drive and then pointed to it using dism /Image:C:\ /Cleanup-Image /RestoreHealth /Source:C:\install.wim and even that gives me the Error 0x800f081f.

    I'm running Win 10 19042.662 and I created a bootable USB with the same version - copied the install.wim file from there and it still gives me the error.

    Can anyone help?

    Thanks in advance.
    Where and how did you extract or obtain the install.wim from? It has to be the edition and version you are trying to repair.
    i.e. the install.esd created by MCT contains several indexed editions of Win10 Home, Pro, N etc.

    The DISM "ONline" switch has little to do with being online, but more so with the actually online Image running ...

    dism /online /Cleanup-Image /RestoreHealth /source:ESD:F:\Sources\Install.esd:6 /LimitAccess

    Above example uses the MCT install.esd index 6 for PRO Edition.
      My Computer


  3. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #3

    Hello @Suzerain,

    Do you have an ISO file on a USB?

    If so, once you boot into Win PE using the installation media, copy the ISO file to the desktop. Then mount that ISO desktop file and make a note of the drive letter. Then use something like this [ change X to the mounted drive letter and Y to the edition number ] . . .

    Code:
    DISM /Online /Cleanup-Image /RestoreHealth /source:X:\Sources\Install.wim:Y /LimitAccess

    I hope this helps.
      My Computer


  4. Posts : 18,432
    Windows 11 Pro
       #4

    Paul Black said:
    Hello @Suzerain,

    Do you have an ISO file on a USB?

    If so, once you boot into Win PE using the installation media, copy the ISO file to the desktop. Then mount that ISO desktop file and make a note of the drive letter. Then use something like this [ change X to the mounted drive letter and Y to the edition number ] . . .

    Code:
    DISM /Online /Cleanup-Image /RestoreHealth /source:X:\Sources\Install.wim:Y /LimitAccess

    I hope this helps.
    You can't use dism /online when booting into Windows PE from a USB flash drive. The /online tag refers to the OS that is currently loaded and booted into - which is in this case WindowsPE from the USB flash drive.
      My Computer


  5. Posts : 4,595
    several
       #5

    If so, once you boot into Win PE using the installation media, copy the ISO file to the desktop.
    which desktop? need a lot of scratchspace. mount the wim image into a folder on hard disk
      My Computer


  6. Posts : 18,432
    Windows 11 Pro
       #6

    This article suggest mounting an image from the install.wim file, and then using the mounted image to repair the corrupted installation:
    https://docs.microsoft.com/en-us/win...-windows-image
      My Computer


  7. Posts : 4,595
    several
       #7
      My Computer


  8. Posts : 18,432
    Windows 11 Pro
       #8

    Looks like @SIW2 and I might be thinking the same process is necessary.
      My Computer


  9. Posts : 5,330
    Windows 11 Pro 64-bit
       #9

    Code:
    DISM /Online /Cleanup-Image /RestoreHealth

    The above command will not work if Windows Update service not working correctly. You will be prompted to use /source parameter to specify the location of the files that are require to restore the damage or missing files.




    The Install.wim is the source of where these corrupted or missing files located.
    The Windows Imaging Format (WIM) is a file-based disk image format. It was developed by Microsoft to help deploy Windows Vista and subsequent versions of Windows operating system family.

    The following command creates new folder named "Mount" at C: partition.

    Code:
    Mkdir  C:\Mount

    You can execute following command to found out index number of your Windows OS edition that you want to repair.

    Code:
    Dism  /Get-WimInfo  /Wimfile:"L:\sources\install.wim"



    Replace the L:\sources with directory path where Install.wim stored. As you can see there is two editions of Windows 10 and all have index number.



    The following command mounts the install.wim image file to C:\Mount folder.

    Code:
    dism /mount-wim /wimfile:WIM:X:\Sources\Install.wim /index:1 /mountdir:C:\Mount
    Replace the X:\Sources folder path with a folder path where Install.wim image file is stored.

    The /Index parameter tells DISM utility to mount which edition of Windows OS. The Install.wim file can contain more than one edition of the Windows OS.


    The following command can be executed to extract corrupted or missing Windows Component Store files.

    Code:
    Dism /Image:C:\Windows /Cleanup-Image /RestoreHealth /Source:c:\mount\windows   /LimitAccess

    To unmount a WIM file using the DISM tool, execute following command.

    Code:
    dism /unmount-wim /mountdir:C:\Mount  /discard
      My Computer


  10. Posts : 5
    Win 10 Pro
    Thread Starter
       #10

    Thanks for the suggestions guys - I think I fixed it but there are still a couple of issues.

    First, I extracted the install.wim file to a folder and then ran this command:

    Dism /Image:C:\ /ScratchDir:C:\windows\temp /Cleanup-Image /RestoreHealth /Source:H:\temp\install\Windows /LimitAccess

    Should the command above have /Image:C:\Windows instead of /Image:C:\?

    It completed succesfully.

    Then, I ran SFC /SCANNOW and it said it found corrupt files but was unable to fix some of them.

    I ran it several times and it then fixed the corrupt files and then finally it said "... found no integrity violations."

    I was then able to boot into Windows and everything seems normal.

    However, this morning I booted into Windows and ran SFC /SCANNOW again just to make sure and I got this message:



    I also ran the DISM commands:


    Dism /Online /Cleanup-Image /CheckHealth
    Dism /Online /Cleanup-Image /ScanHealth
    Dism /Online /Cleanup-Image /RestoreHealth


    ... and all of them completed successfully - the results were:



    The weird thing is, I checked the CBS.log file for the corrupt files but couldn't find anything in there! I even set the option to create the SFCDetails.txt file on the Desktop and checked there - also no corrupted files! Here is the CBS.log file.

    So I'm not sure why SFC /SCANNOW is returning the message that it found corrupt files but was unable to fix some of them.

    I even booted into Safe Mode and ran those commands (DISM & SFC) and it was the same result - component store was restored and no corruption but SFC returned that there were corrupt files and it was unable to fix some of them.

    I tried it again with a Clean Boot but again, same result.

    The OS seems to be working fine (for now) so is it a false positive? It's one of those things I'd rather fix than leave it hanging - more annoying knowing that the system isn't "perfect."

    Is there a way to fix this?
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 12:45.
Find Us




Windows 10 Forums