DISM /ScanHealth and /RestoreHealth

Those two DISM commands only exist for an online image, because you need a live WinSxS to compare installed files against. There is no equivalent for offline images because nothing has been installed.

When NTLite loads your online image, it has exclusive access to the DISM mount point and no other DISM commands can run against it. That's the normal way DISM works, and you can't run a separate repair or scan command until NTLite unloads the image. So in this case, it's not possible for NTLite run the command on your behalf unless the online image wasn't loaded.
 
DISM++ allows to mount images offline and perform DISM ScanHealth, but I am not sure how it works. I think it compares WinSxS from ISO with already expanded files in the same ISO.
 
The only case where this makes sense is scanning a captured sysprep image. But I have no idea why DISM++ is this stupid.

1. Mount clean install.wim from DISM++
2. Run Recovery / Scan Health. "The image is intact. No repair needed."

3. Delete \mount\Windows\System32\notepad.exe
4. Run Recovery / Scan Health. "The image is intact. No repair needed."
 

Attachments

  • Screenshot 2024-02-14 040445.png
    Screenshot 2024-02-14 040445.png
    20.5 KB
  • Screenshot 2024-02-14 040635.png
    Screenshot 2024-02-14 040635.png
    55.9 KB
I deleted all the \Windows\System32 DLL's from my mounted image. DISM++ ain't that smart.
 
I think NTLite should include a feature to run DISM ScanHealth and DISM RestoreHealth for offline and online images.
Thanks for the suggestion. On paper, maybe, if someone configured an image manually and doesn't want to start fresh.
Best is fresh ISO, faster and more reliable than repairing, then use a preset to get to where you want to.
Don't use images to store changes, use presets and REGs.

However, Microsoft does advertise that it's possible to repair an image as well using the "/Source:c:\test\mount\windows".
It's just I never succeeded in using that option. Tried all combinations that came to mind, repair would still fail on a broken image.
Maybe DISM fixed it in the meantime, maybe host OS can pull files online regardless of the target, I just haven't seen it in action.

The repair is mostly needed for the deployed OS anyway, but then it's just one command, not necessary to bloat the UI for it... unless there are custom steps necessary, preparation of that Source etc, keeping an eye on that one.
 
However, Microsoft does advertise that it's possible to repair an image as well using the "/Source:c:\test\mount\windows".
It's just I never succeeded in using that option. Tried all combinations that came to mind, repair would still fail on a broken image.
Maybe DISM fixed it in the meantime, maybe host OS can pull files online regardless of the target, I just haven't seen it in action.

Reading between the lines, this wording strongly implies it's for a captured image:
Repair a Windows image using DISM. You can repair offline Windows image in a WIM or VHD file, or an online Windows image.

Why would you store an offline image on a VHD file, other than it's a live system capture? For testing, I renamed one of the Windows boot folder's language MUI's (fr-CA) and performed a DISM capture.

DISM++ finally reported an error:

1707932890403.png

RestoreHealth didn't work so well. I don't know how to pass a missing /source: parameter from DISM++.

1707934412986.png
 
NTL and DISM++ is not the same - latter will always show and error - same if you do it on a fresh NTLited installed image.
It's a Windows thing.
 
Back
Top