New
#21
So I figured out something interesting and got a bit further.
First of all for what it's worth I've reinstalled Windows on the original laptop and everything from now on is using an image I took of the hard drive and a Virtualbox VM. So far the behaviour is identical.
Anyway I booted a running Windows 10 with my faulty installation as an external drive and tried running SFC on that. Windows promptly popped up a window complaining about a api-ms-win-base-util-l1-1-0.dll in a temporary directory. Thinking that this might be a copy of that dll from my installation, I searched for dll's of that name and found two of them, in \Windows\System32\downlevel and \Windows\SysWOW64\downlevel. But what stuck out was that both of them were zero bytes long, as were a bunch of other dlls in those two directories.
So I downloaded the installation ISO for the same version of Windows (2004), mounted the install.wim file and copied over all those zero length files into my installation. And lo and behold, dism now runs.
X:\Sources>dism /image:c:\ /cleanup-image /restorehealth /scratchdir:c:\scratchdir
Deployment Image Servicing and Management tool
Version: 10.0.19041.746
Image Version: 10.0.19041.1052
[==========================100.0%==========================]
Error: 0x800f081f
The source files could not be found.
Use the "Source" option to specify the location of the files that are required to restore the feature. For more information on specifying a source location, see https://go.microsoft.com/fwlink/?LinkId=243077.
The DISM log file can be found at X:\windows\Logs\DISM\dism.log
I guess I need to do some more research at this stage but in case anyone can help I've attached the dism.log file.