Problems with DISM


You should run the DISM command first.
DISM /Online /Cleanup-Image /RestoreHealth

Then sfc /scannow

Reason is running DISM first repairs the underlying image that SFC relies on to get repair files from.

If the image has corruption and you run SFC first you are potentially replacing good files with corrupted ones from a bad source (Image).
 

My Computer My Computer

At a glance

Windows 11 Pro
OS
Windows 11 Pro
why not just ignore sfc and run DISM /Online /Cleanup-Image /RestoreHealth /Source:WindowsUpdate
 

My Computers My Computers

  • At a glance

    Windows 11 Pro 25H2 26200.9168AMD Ryzen 7 5825U with Radeon Graphics16GB
    OS
    Windows 11 Pro 25H2 26200.9168
    Computer type
    Laptop
    Manufacturer/Model
    Acemagic LX15PRO
    CPU
    AMD Ryzen 7 5825U with Radeon Graphics
    Motherboard
    BIOS CT_BI_AMI_LX15PRO_AB8139_A-004
    Memory
    16GB
    Screen Resolution
    1920 x 1080
    Hard Drives
    SSD 2TB
    Internet Speed
    30 Mbps
    Browser
    Brave
    Antivirus
    Webroot SecureAnywhere Complete beta
  • At a glance

    Windows 11 Pro 23H2 22631.2506Atom N450 1.66GHz2GB
    Operating System
    Windows 11 Pro 23H2 22631.2506
    Computer type
    Laptop
    Manufacturer/Model
    HP Mini 210-1090NR PC (bought in late 2009!)
    CPU
    Atom N450 1.66GHz
    Memory
    2GB
    Browser
    Brave
    Antivirus
    Webroot
  • Acer Swift SF114-34 laptop
    OS Windows 11 Pro 26200.8894
    CPU Pentium Silver N6000
    RAM 4GB
    BIOS v1.17
    SSD Samsung 970 EVO Plus SSD 2TB (an upgrade)
why not just ignore sfc and run DISM /Online /Cleanup-Image /RestoreHealth /Source:WindowsUpdate
By default DISM /Online /Cleanup-Image /RestoreHealth repairs corrupted system files by checking the Windows image for damage and automatically downloading replacements from Windows Update.

No need for the WU switch as WU is already used by default.

Only time you need to use the source switch is if pointing to install.wim or some other local source.
 

My Computer My Computer

At a glance

Windows 11 Pro
OS
Windows 11 Pro
No, that's not correct. It will use WU, but that is not the default.
 

My Computers My Computers

  • At a glance

    Windows 11 Pro 25H2 26200.9168AMD Ryzen 7 5825U with Radeon Graphics16GB
    OS
    Windows 11 Pro 25H2 26200.9168
    Computer type
    Laptop
    Manufacturer/Model
    Acemagic LX15PRO
    CPU
    AMD Ryzen 7 5825U with Radeon Graphics
    Motherboard
    BIOS CT_BI_AMI_LX15PRO_AB8139_A-004
    Memory
    16GB
    Screen Resolution
    1920 x 1080
    Hard Drives
    SSD 2TB
    Internet Speed
    30 Mbps
    Browser
    Brave
    Antivirus
    Webroot SecureAnywhere Complete beta
  • At a glance

    Windows 11 Pro 23H2 22631.2506Atom N450 1.66GHz2GB
    Operating System
    Windows 11 Pro 23H2 22631.2506
    Computer type
    Laptop
    Manufacturer/Model
    HP Mini 210-1090NR PC (bought in late 2009!)
    CPU
    Atom N450 1.66GHz
    Memory
    2GB
    Browser
    Brave
    Antivirus
    Webroot
  • Acer Swift SF114-34 laptop
    OS Windows 11 Pro 26200.8894
    CPU Pentium Silver N6000
    RAM 4GB
    BIOS v1.17
    SSD Samsung 970 EVO Plus SSD 2TB (an upgrade)
No, that's not correct. It will use WU, but that is not the default.
Yes it is unless you have group policy set to use some other source or use the source switch.

Screenshot 2025-12-15 103919.webp


Source
 

My Computer My Computer

At a glance

Windows 11 Pro
OS
Windows 11 Pro
There may be some truth in what you say and we may be at cross purposes. My understanding is this.

DISM /Online /Cleanup-Image /RestoreHealth operates on the online Windows installation and primarily uses the Windows component store (C:\Windows\WinSxS) to check for corruption and repair system files. By default, it will attempt to use Windows Update as a source if it needs replacement files that are missing or corrupted in the component store. If the component store itself is damaged, you can specify an alternate source with the /Source option.

So in short: the component store is always involved; Windows Update is only used if necessary.
 

My Computers My Computers

  • At a glance

    Windows 11 Pro 25H2 26200.9168AMD Ryzen 7 5825U with Radeon Graphics16GB
    OS
    Windows 11 Pro 25H2 26200.9168
    Computer type
    Laptop
    Manufacturer/Model
    Acemagic LX15PRO
    CPU
    AMD Ryzen 7 5825U with Radeon Graphics
    Motherboard
    BIOS CT_BI_AMI_LX15PRO_AB8139_A-004
    Memory
    16GB
    Screen Resolution
    1920 x 1080
    Hard Drives
    SSD 2TB
    Internet Speed
    30 Mbps
    Browser
    Brave
    Antivirus
    Webroot SecureAnywhere Complete beta
  • At a glance

    Windows 11 Pro 23H2 22631.2506Atom N450 1.66GHz2GB
    Operating System
    Windows 11 Pro 23H2 22631.2506
    Computer type
    Laptop
    Manufacturer/Model
    HP Mini 210-1090NR PC (bought in late 2009!)
    CPU
    Atom N450 1.66GHz
    Memory
    2GB
    Browser
    Brave
    Antivirus
    Webroot
  • Acer Swift SF114-34 laptop
    OS Windows 11 Pro 26200.8894
    CPU Pentium Silver N6000
    RAM 4GB
    BIOS v1.17
    SSD Samsung 970 EVO Plus SSD 2TB (an upgrade)
The component store is involved because that's what is being scanned for corruption. It can't get replacement files from the component store if that's what is corrupted.

The source for correct files is whatever Features on Demand is configured to use. That's Windows Update by default and if allowed by policy. You can also use a mounted WIM, a shared \Windows folder from a working PC on the network, Windows installation files like you would find in the ISO, etc.

 

My Computer My Computer

At a glance

Windows 11 Enterprise 25H2
OS
Windows 11 Enterprise 25H2
Do you know why we don't execute Dism /Online /Cleanup-Image /RestoreHealth command from recovery environment?
Because of the /Online switch and you are not inside the windows environment but inside the recovery environment. Normal Windows has not been started. The 2 commands I gave only works if your system has booted with Windows.

In a recovery environment you have to tell where Windows "lives".
(It does not know at that moment. De X-drive is a symbolic link towards the C-drive. With other words X and C are the same.)

You have to alter the DISM command into:
X:\Windows\System32>Dism /Image:C:\ /ScratchDir=C:\Windows\Temp /Cleanup-Image /RestoreHealth

If you leave out the /ScratchDir argument it will complain. (because it's afraid that there in enough space.)

The scratch directory size might be insufficiënt to perform this operation. This can cause unexpected behavior.
Use the /ScratchDir option to point to a folder with sufficient scratch space. The recommended size is at least 1024 Mb.
It does not matter if you use this option or not. It will not write any files to that location.
But you can see the results in the C:\Windows\Logs\CBS\CBS.log file and C:\Windows\Logs\DISM\dism.log file if you want. (using notepad. Leave out the .exe part) When in the Recovery Environment go to: Solve Problems - Advance options - CommandPrompt and simply execute the mentioned command.


Edit: Just found this out; SFC /Scannow inside a Recovery Environment is untrustworthy. It keeps finding problems. Go to Windows? SFC: No problems. Back again in the Recovery Environment? SFC: Problems. Executing a second time inside the Recovery Environment; It will refuse. There are repairs pending. Go To Windows? SFC: No Problems. Recovery? SFC: Problems. It seems to me that this command is not fit to be executed inside a recovery environment. It always report errors and fixed them. No evidence that it wrote into CBS.log as mentioned. Would avoid executing it.
 
Last edited:

My Computers My Computers

  • At a glance

    Win 11 Pro 25H2 Build 26200.9168, Zorin OS ProIntel® Core™ i7-12700KF 12th Gen. (S1700)32GB DDR5 5600-36 Vengeance (2x16)PCIe4.0 Asus NVIDIA RTX3060Ti
    OS
    Win 11 Pro 25H2 Build 26200.9168, Zorin OS Pro
    Computer type
    PC/Desktop
    Manufacturer/Model
    Self built
    CPU
    Intel® Core™ i7-12700KF 12th Gen. (S1700)
    Motherboard
    ASUS Prime Z690-A, BIOS v4505 (Z690 Intel Chipset)
    Memory
    32GB DDR5 5600-36 Vengeance (2x16)
    Graphics Card(s)
    PCIe4.0 Asus NVIDIA RTX3060Ti
    Sound Card
    Onboard; Realtek
    Monitor(s) Displays
    34" LG 34UC79G-B Curved 21:9 144Hz
    Screen Resolution
    2560x1080 (No HDR)
    Hard Drives
    250Gb Samsung 870PRO NVMe (Win 11 Pro)
    1Tb Samsung 980PRO NVMe
    1Tb Samsung 970EVO NVMe
    2Tb Samsung 990PRO NVMe with heatsink.
    4Tb WDC WD40EZRZ Blue SATA (Int.)
    4Tb WDC WD40EZRZ Blue SATA (Int.)
    3Tb WDC WD30EFRZ Red SATA (Int.)
    256Gb Samsung 840PRO SSD (RHEL 9,5)
    256Gb Samsung 850PRO SSD (Zorin OS Pro 18)
    PSU
    Coolermaster 850W V2 Gold with internal 12cm exaust fan
    Case
    Be-Quiet Pure Base 600.
    Cooling
    3x Be-Quiet! 12/14cm "Silent Wings 4" casefans, 1x Arctic Freezer i35 CPU towerblock with fan.
    Keyboard
    Steelseries APEX 7 keyboard.
    Mouse
    Logitech G-502 Hero
    Internet Speed
    1Gb
    Browser
    Brave
    Antivirus
    F-Secure
    Other Info
    No Noise system.
    256Gb Kingston Travler USB 3.0 drive.
    64Gb Sandisk USB 3.2 drive. (Ventoy)
    8Gb Philips USB 3.0 drive. (Win. Inst.)
    8Gb Philips USB 3.0 drive. (Rescue disk)
    2Tb WD USB 3.0 Passport drive.
    USB Ext. 500Gb WD SATA drive.
    External USB 3.0 C.A. CD/DVD* burner.
  • At a glance

    Windows 11 Pro 25H2Intel® Core™ i7-6700K 6th Gen. (S1151)32Gb DDR4 2400 Corsair Vengeance (4x8)ASUS GeForce GTX1080
    Operating System
    Windows 11 Pro 25H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Selfbuild
    CPU
    Intel® Core™ i7-6700K 6th Gen. (S1151)
    Motherboard
    ASUS Maximus VIII Ranger (Intel Chipset Z170)
    Memory
    32Gb DDR4 2400 Corsair Vengeance (4x8)
    Graphics card(s)
    ASUS GeForce GTX1080
    Sound Card
    Onboard; Realtek
    Monitor(s) Displays
    LG IPS277L 27" WideLED, IPS
    Screen Resolution
    1920x1080
    Hard Drives
    Samsung 850 Pro SSD
    PSU
    Zalman ZM600-HP with internal exhaust fan. Heatpipes & Modular cables.
    Case
    Cooler Master Aero
    Cooling
    Scythe Mugen 4 dual fan towerblock.
    Keyboard
    Red Dragon
    Mouse
    Red Dragon
    Internet Speed
    1Gb
    Browser
    Chrome
    Antivirus
    F-Secure

Latest Support Threads

Back
Top Bottom