Info Fixing dism error 800f018f ("the source cannot be read")

mikeymikec

Lifer
May 19, 2011
20,524
15,331
136
I'm posting an informative post because I've been trying to find a solution for this myself and routinely found wrong information on the Internet (the fact that the Windows 10/11 ISO does not contain install.wim).

Various sources suggest trying various dism switches (/startcomponentcleanup, etc) but if those don't work then you need to specify a source because Windows claims not to have one.

You need a valid Windows ISO for your Windows install; if in doubt then use Microsoft's Media Creation Tool off the Internet to download the correct ISO for you.
Next, mount / double-click on the ISO, so it gets its own drive letter.

Open an admin command prompt.

Then run:
Code:
dism /Get-WimInfo /WimFile:path\to\ISO\sources\install.esd

You'll then get an output of the various Windows editions that ISO caters for, so pick yours out (e.g. Win10 Pro) and make a note of the index number.

Copy that esd file to a location (say C:\Backup), CD to that location.

Code:
dism /export-image /SourceImageFile:install.esd /SourceIndex:IndexNumber /DestinationImageFile:install.wim /Compress:max /CheckIntegrity

I don't know whether the compression option is necessary but it kicked an i5-6600's ass.

Code:
DISM /Online /Cleanup-Image /RestoreHealth /Source:WIM:c:\Backup\install.wim:indexnumber_you_noted_earlier /LimitAccess

I may add to this because despite me getting the commands right, I'm still getting the same error :))
 
  • Like
Reactions: Quintessa

Quintessa

Member
Jun 23, 2025
54
32
46
I may add to this because despite me getting the commands right, I'm still getting the same error
Yup; even with the right wim, windows can still choke if the ISO build doesn't exactly match your installed build (down to the minor build number, e.g., 19045.4235 vs 19045.4355), or corruption exists in WinSxS that DISM can't fix without a repair install.
 
  • Like
Reactions: mikeymikec

mikeymikec

Lifer
May 19, 2011
20,524
15,331
136
Yup; even with the right wim, windows can still choke if the ISO build doesn't exactly match your installed build (down to the minor build number, e.g., 19045.4235 vs 19045.4355)

I wouldn't mind that if the log file (cbs/dism) actually told me which file was a problem, but instead it gave me another error code, for which there are many pages claiming to explain the cause of this error, but *every single one* is like, "it could be disk space, or a corrupt file, or just about anything, try throwing all these troubleshooting techniques at it".

I ended up in-place installing Win10, now sfc/dism are both happy with life now.
 

Quintessa

Member
Jun 23, 2025
54
32
46
but *every single one* is like, "it could be disk space, or a corrupt file, or just about anything, ..."
Yeah, DISM’s "helpful" error codes are basically a roulette wheel. 800f018f might as well mean ¯\_(ツ)_/¯.
In-place upgrade is often the fastest way out -- 30 -- 40 min and you dodge hours of log-file archaeology.

At least now you've got a clean baseline so if it happens again, you can grab the exact build ISO before it snowballs.