How to use DISM in WINDOW PE environment?

Page 1 of 2 12 LastLast

  1. Posts : 24
    10
       #1

    How to use DISM in WINDOW PE environment?


    i am trying to repair my windows(i cannot boot to windows 10 and i tried automatic repair three times already). Can't even boot to safe mode. Keeps getting pci.sys corruption error at boot up.

    So i am forced to use a usb to boot to a Pre-installed window environment.

    Upon using Dism /online /cleanup-image /checkhealth

    i get an error:

    error 50 DISM does not support servicing windows PE with the /online option.

    Please help.

    Sidenote: I already tried sfc /scannow and got an error: windows resource system found corruptions but is unable to fix. So that why i am using DISM.
      My Computer


  2. Posts : 5,478
    2004
       #2

    If you are booting PE then you want to repair the offine image - online refers to the Windows image currently running which if you booted PE would be PE.

    Something line Dism /Image:C:\offline /Cleanup-Image /RestoreHealth /Source:c:\test\mount\windows

    See Repair a Windows Image

    Your PE environment needs to have DISM installed also if it doesn't already. You'd need to mount PE, add these and then dismount again.
    Code:
    Add-Package WinPE-WMI 		# subset of WMI providers that enable minimal system diagnostics
    Add-Package WinPE-NetFX 	# subset of the .NET Framework 4.5
    Add-Package WinPE-Scripting 	# multiple-language scripting environment
    Add-Package WinPE-PowerShell 	# PowerShell–based diagnostics (requires all previous)
    Add-Package WinPE-DismCmdlets 	# Dism PowerShell module
    WinPE: Add packages (Optional Components Reference)

    Most likely these will be added anyway but it depends where you got your PE image from.
      My Computer


  3. Posts : 24
    10
    Thread Starter
       #3

    i am using the windows 10 boot from:

    Windows 10 Recovery Tools - Bootable Rescue Disk - Windows 10 Forums

    Apology, but I am new at this. Can someone walk me through this?

    I am confused at the mounting. Also the code given, do i type it in cmd.exe?
      My Computer


  4. Posts : 5,478
    2004
       #4

    From Recovery Environment the DISM commands are installed I believe so nothing to worry about there. And, yes, you will need to enter commands from cmd.exe.

    From Recovery Environment you will get a command prompt like X:\>Sources (see this tutorial - Open Command Prompt at Boot in Windows 10 Windows 10 General Tips Tutorials )

    Then you need to identify which drive letter is assigned to the windows installation on your PC. Most likely it will be C but it may not.

    This tutorial explains how. Run SFC Command in Windows 10 Windows 10 Performance Maintenance Tutorials

    If you haven't run SFC at boot as described in the tutorial above then run it - something like:
    sfc /scannow /offbootdir=C:\ /offwindir=C:\windows

    Then (assuming it is C - if not change C to D or whatever) enter:
    DISM /image:C:\ /cleanup-image /revertpendingactions

    The "/revertpendingactions" switch is optional but according to this blog helps with non-booting situations.

    Getting out of a no boot situation after installing updates on Windows 7-2008R2 The Windows Servicing Guy
      My Computer


  5. Posts : 112
    Win 7 Ultimate
       #5

    lx07 said:
    From Recovery Environment the DISM commands are installed I believe so nothing to worry about there. And, yes, you will need to enter commands from cmd.exe.

    From Recovery Environment you will get a command prompt like X:\>Sources (see this tutorial - Open Command Prompt at Boot in Windows 10 Windows 10 General Tips Tutorials )

    Then you need to identify which drive letter is assigned to the windows installation on your PC. Most likely it will be C but it may not.

    This tutorial explains how. Run SFC Command in Windows 10 Windows 10 Performance Maintenance Tutorials

    If you haven't run SFC at boot as described in the tutorial above then run it - something like:
    sfc /scannow /offbootdir=C:\ /offwindir=C:\windows

    Then (assuming it is C - if not change C to D or whatever) enter:
    DISM /image:C:\ /cleanup-image /revertpendingactions

    The "/revertpendingactions" switch is optional but according to this blog helps with non-booting situations.

    Getting out of a no boot situation after installing updates on Windows 7-2008R2 The Windows Servicing Guy
    I've come across a similar scenario. Will try this out and report.
      My Computer


  6. Posts : 2
    Winblows
       #6

    xbliss said:
    I've come across a similar scenario. Will try this out and report.
    so what's the report?
      My Computer


  7. Posts : 5,324
    Windows 11 Pro 64-bit
       #7

    Please boot your computer with the latest version of Windows Setup Media and from Windows Recovery Environment start the Command Prompt.

    Please type the below command into Command Prompt and press the Enter key.

    The following commands scans integrity of all protected Windows system files and repairs files with problems when possible.

    Code:
    Dism  /image:D:  /Cleanup-Image  /RestoreHealth  /Source:wim:E:\sources\install.wim:1  /LimitAccess
    
    Sfc  /Scannow   /OFFBOOTDIR=D:\   /OFFWINDIR=D:\Windows


    Please replace partition letter D: with Windows installed partition letter. When the computer boots into Windows Recovery Environment (WinRE) environment, the drive letter assign to Windows partition may not be C: drive letter because Windows 7, 8 , 8.1 and 10 creates a separate system partition when it's installed from scratch. The system partition contains boot files WinRE assigns the system partition the C: drive letter and the Windows installed partition will be assigned any other drive letter, usually D: drive letter is assign to Windows installed partition. The Bcdedit /enum | find "osdevice" command can be used to find out the drive letter of the Windows installed partition, the output of the Bcdedit command is similar to this osdevice partition=D:. The drive letter after partition= is the drive letter of the Windows partition.

    Please replace E: drive letter with Windows 10 Setup Media drive letter. The following commands list all the drive letters detected by Windows 10:


    Code:
    Diskpart
    List volume

    The 1 index number tells DISM utility to retrieve the corrupted or missing files from which edition of Windows OS. The Install.wim file can contain more than one edition of the Windows OS. 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 are two editions of Windows 10 and all have index number.
      My Computer


  8. Posts : 2
    Winblows
       #8

    That's nice, but you aren't xbliss lol. My issue was fixed with 'DISM /image:C:\ /cleanup-image /revertpendingactions'
      My Computer


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

    baalpeteor said:
    That's nice, but you aren't xbliss lol. My issue was fixed with 'DISM /image:C:\ /cleanup-image /revertpendingactions'
    Did you start this thread because we are helping OP with the Dism problem?
      My Computer


  10. Posts : 11,247
    Windows / Linux : Arch Linux
       #10

    Hi folks

    Forget all this stuff -most boot problems can simply be fixed by re-installing Windows boot mgr.

    To REPAIR boot the easiest way is to boot either Windows install ISO or Winpe iso or macrium stand alone recovery - or equivalent into Command mode.

    To create WINPE iso :

    https://docs.microsoft.com/en-us/win...iew=windows-11

    Then two ways to proceed

    1) EFI systems.

    diskpart
    list disk
    select disk xxxx (the actual Windows disk)
    list volume
    select volume yyy (the usually 100Mb EFI partition - will probably be labelled system and marked hidden
    assign letter=S
    exit

    now assume that the Windows disk is D
    cd D:\windows\system32
    bcdboot d:\windows \s S: /f UEFI

    exit

    reboot your system

    on BIOS systems you need to write the boot rec to the boot or system partition -- as I don't have a BIOS system to test this on someone else can answer that but the object is simply to re-write the boot record via bcdboot.

    It could be as simple as bcdboot d:\windows

    Cheers
    jimbo
      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:16.
Find Us




Windows 10 Forums