Source files not found when using DISM /RestoreHealth

Jim Dyer 0 Reputation points
2024-06-10T21:34:46.2833333+00:00

I'm trying to fix a corrupted Windows Image which DISM says is repairable. I have downloaded the Windows ISO, and used WinRAR to extract the files, as there was a problem trying to mount the ISO.
I have pasted the install.wim file directly to my C:\ drive as I have no disk drive or working USB ports currently, apart from my keyboard and mouse.
I have managed to Get-WimInfo and found that for Windows 11 Pro I need to use index 6, so I am entering the following on CMD(administrator mode),

Dism /Online /Cleanup-Image /RestoreHealth /Source:wim:"C:\install.wim":6 /limitaccess

but repeatedly getting

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 C:\WINDOWS\Logs\DISM\dism.log

Here is the DISM log from where it first spots an error, at about 60% into the process. It never goes any further.

2024-06-10 19:09:02, Info DISM DISM Package Manager: PID=19432 TID=11156 Error in operation: source for package or file not found, ResolveSource() unsuccessful. (CBS HRESULT=0x800f081f) - CCbsConUIHandler::Error

2024-06-10 19:09:02, Error DISM DISM Package Manager: PID=19432 TID=21512 Failed finalizing changes. - CDISMPackageManager::Internal_Finalize(hr:0x800f081f)

2024-06-10 19:09:02, Error DISM DISM Package Manager: PID=19432 TID=21512 The source files could not be found; their location must be specified using the /source option to restore the feature. - GetCbsErrorMsg

2024-06-10 19:09:02, Error DISM DISM Package Manager: PID=19432 TID=21512 Failed processing package changes with session option CbsSessionOptionRepairStoreCorruption - CDISMPackageManager::RestoreHealth(hr:0x800f081f)

2024-06-10 19:09:02, Error DISM DISM Package Manager: PID=19432 TID=21512 The source files could not be found; their location must be specified using the /source option to restore the feature. - GetCbsErrorMsg

2024-06-10 19:09:02, Error DISM DISM Package Manager: PID=19432 TID=21512 Failed to restore the image health. - CPackageManagerCLIHandler::ProcessCmdLine_CleanupImage(hr:0x800f081f)

2024-06-10 19:09:02, Error DISM DISM Package Manager: PID=19432 TID=21512 Failed while processing command cleanup-image. - CPackageManagerCLIHandler::ExecuteCmdLine(hr:0x800f081f)

2024-06-10 19:09:02, Info DISM DISM Package Manager: PID=19432 TID=21512 Further logs for online package and feature related operations can be found at %WINDIR%\logs\CBS\cbs.log - CPackageManagerCLIHandler::ExecuteCmdLine

2024-06-10 19:09:02, Info DISM DISM Package Manager: PID=19432 TID=21512 Finalizing CBS core. - CDISMPackageManager::Finalize

2024-06-10 19:09:02, Info DISM DISM Manager: PID=16032 TID=21092 Closing session event handle 0x210 - CDISMManager::CleanupImageSessionEntry

2024-06-10 19:09:02, Info DISM DISM.EXE: Image session has been closed. Reboot required=no.

2024-06-10 19:09:02, Info DISM DISM.EXE:

2024-06-10 19:09:02, Info DISM DISM.EXE: <----- Ending Dism.exe session ----->

2024-06-10 19:09:02, Info DISM DISM.EXE:

Please could somebody help me?

Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
4,959 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,665 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MotoX80 32,531 Reputation points
    2024-06-10T23:00:04.99+00:00

    used WinRAR to extract the files, as there was a problem trying to mount the ISO

    Just right click the .ISO file with the Windows Explorer and select "mount". That should make it available as a drive letter. Try it this way where "e:" is your drive letter.

    md C:\test\offline  
    DISM.exe /Mount-Wim /WimFile:e:\sources\install.wim /index:6 /MountDir:C:\test\offline /ReadOnly 
    Dism.exe /Online /Cleanup-Image /restoreHealth /source:C:\test\offline /loglevel:4 
    

    When you are done run this and right click the mounted ISO and select Eject.

    DISM.exe /Unmount-Wim /MountDir:C:\test\offline /discard