Hiya all,

I am trying to repair an image (corrupt) with DISM using an install.wim. But I keep getting error 2:

"Unable to access image."
... check image path and windows directory and have read permissions on folder ...

The folder is the temporary folder on X:\windows\temp as DISM has to be run from WinRE, so /OFFLINE - no /Online solution will help with this case (I am aware this can be tried with install.esd too). So via this code:

Dism /Image:E:\ /Cleanup-Image /RestoreHealth /Source:wim:H:\sources\install.wim

However, I have checked and changed the access permissions for the install.wim, its' folder and the temporary folder on X:, but I remain with this error.

To change the permissions on install.wim and its' folder is easy via properties etc ...

But it involves a bit of code for the temp folder on X: For example:

i) takeown /f x:\windows\temp /r /d y

ii) icacls x:\windows\temp /grant everyone:f /t /q

and can be restored via

iii) icacls x:\windows\temp /reset

This all relates to a previous issue, that I have progressed with, but a reset etc is still not possible despite changes made to windows.

My questions are:

(1) Any better ways of using DISM /offline to repair the windows image (for winload.efi especially)?

(2) Other ways of solving error 2 in DISM which is due to the temp folder on x: - which writes live files on every reboot as in srttrail.txt - only says version of OS incompatible ... which is related to the build of windows 10 as it is over 1803 - , disklayout etc ...

Any ideas advanced users / technically minded?