The source files Not found running DISM /Restorehealth

shockwaveriderz 61 Reputation points
2020-11-28T18:27:51.46+00:00

I run the following once a week before I do a system image backup:

Sfc /scannow
Dism /Online /Cleanup-Image /CheckHealth
Dism /Online /Cleanup-Image /ScanHealth
Dism /Online /Cleanup-Image /RestoreHealth

The 1st 3 commands complete successfully.

On the 4th and last command I have started to get The sources files could not be found 0x800f081f.

The relevant entries from the DISM.log file are below:

2020-11-27 22:29:53, Info DISM DISM Package Manager: PID=8500 TID=8796 Error in operation: source for package or file not found, ResolveSource() unsuccessful. (CBS HRESULT=0x800f081f) - CCbsConUIHandler::Error
2020-11-27 22:29:53, Error DISM DISM Package Manager: PID=8500 TID=17644 Failed finalizing changes. - CDISMPackageManager::Internal_Finalize(hr:0x800f081f)
2020-11-27 22:29:53, Error DISM DISM Package Manager: PID=8500 TID=17644 The source files could not be found; their location must be specified using the /source option to restore the feature. - GetCbsErrorMsg
2020-11-27 22:29:53, Error DISM DISM Package Manager: PID=8500 TID=17644 Failed processing package changes with session option CbsSessionOptionRepairStoreCorruption - CDISMPackageManager::RestoreHealth(hr:0x800f081f)
2020-11-27 22:29:53, Error DISM DISM Package Manager: PID=8500 TID=17644 The source files could not be found; their location must be specified using the /source option to restore the feature. - GetCbsErrorMsg
2020-11-27 22:30:08, Error DISM DISM Package Manager: PID=8500 TID=17644 Failed to restore the image health. - CPackageManagerCLIHandler::ProcessCmdLine_CleanupImage(hr:0x800f081f)
2020-11-27 22:30:08, Error DISM DISM Package Manager: PID=8500 TID=17644 Failed while processing command cleanup-image. - CPackageManagerCLIHandler::ExecuteCmdLine(hr:0x800f081f)

Questions that I have:

where is the .esd/.wim image. ie the sources files , located on my C: disk when this command was running successfully previously without throwing this error?

Why would the dism /restorehealth command run successfully for literally 18 months and then now start saying it can't find the source files?

when you run a dism /restorehealth command or its /Checkhealth or /Scanhealth what files are they comparing against? and where are they located on disk?

Are there any DISM experts here that can answer these questions? Perhaps give me a play by play how DISM is comparing files against files in the esd or wim image on disk?

Running win 10 pro 1909 18363.1110

TIA

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,705 questions
0 comments No comments
{count} votes

Accepted answer
  1. Joy Qiao 4,886 Reputation points Microsoft Employee
    2020-11-30T09:07:08.813+00:00

    Hi,

    The parameter CheckHealth is used to check whether the image has been flagged as corrupted by a failed process and whether the corruption can be repaired. But this command doesn’t scan the files or fix anything, it only reports if there are any corruptions marked already in the registry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing, to check Unserviceable equals to 1 or 0. So CheckHealth returns result very quickly.

    The ScanHealth command-line, on the other hand, doesn’t rely on the previously marked data. It would rather scan each file in the C:\Windows\WinSxS directory and sub-directories, verify their hashes. It then reports if the component store is corrupted or healthy. If the ScanHealth command-line finds the component store is healthy, it removes the corrupt and unserviceable values in the registry automatically, thereby marking the component store as healthy.

    RestoreHealth parameter uses Windows Update to provide the files that are required to fix corruptions. But if your Windows update component file is corrupted, it will return repair file failure or need to specify location or resource for restore health.

    The default measure it repair is that download needed files from Windows update, but we could change it through Group Policy settings like below:
    Click Computer Configuration, click Administrative Templates, click System, and then double-click the Specify settings for optional component installation and component repair setting.
    Or we could use command line below to limit source to Winsxs component store.
    DISM.exe /Online /Cleanup-Image /RestoreHealth /Source:C:\Windows\WinSxS /LimitAccess

    If you are using a computer without network, it will also repair use WinSxS components store files by default.

    If it is not able to repair system, we should download Windows 10 ISO image. But it not limit to a same system build image like yours 10.0.18363.1110, as long as it's Windows 10 ISO, it could be used for repair.

    As I noticed you are not running as the latest system version, I would recommend to update system at first, then specify source for DISM.

    If you have any other issue or confuse, please reply here.

    Bests,

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    4 people found this answer helpful.

13 additional answers

Sort by: Most helpful
  1. Docs 15,146 Reputation points
    2021-09-28T04:54:26.387+00:00

    This is an old thread that was started in 2020.

    Consider opening a new thread to troubleshoot scannow corruption and failure to upgrade.

    In the new thread post images or share links (one drive, drop box, or google drive) with these commands and results:

    sfc /scannow
    dism /online /cleanup-image /scanhealth
    dism /online /cleanup-image /restorehealth
    sfc /scannow

    .
    .
    .
    .
    .
    Please remember to vote and to mark the replies as answers if they help.

    On the bottom of each post there is:

    Propose as answer = answered the question

    On the left side of each post: Vote = a helpful post
    .
    .
    .
    .
    .

    1 person found this answer helpful.

  2. Dave Patrick 426.1K Reputation points MVP
    2020-11-28T18:42:38.6+00:00

    dism /online /cleanup-image /restorehealth
    the default source is from internet (Windows Update) so I'd check an internet connection is available when running.
    https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/repair-a-windows-image

    --please don't forget to Accept as answer if the reply is helpful--


  3. shockwaveriderz 61 Reputation points
    2020-11-28T18:45:31.797+00:00

    This seems to be what may be causing the Source files not found:

    By default DISM looks online to find the required files to repair the Windows Image. But in most cases, this doesn't work, so you need to specify a local source for the known good files by using the /Source switch.
    The error "The Sources files could not be found files" in DISM tool, is commonly caused because of the following reasons:
    Reason 1. DISM tool cannot find online (in Windows Update or WSUS) the files needed to perform the repair, when using this command: "DISM /Online /Cleanup-Image /RestoreHealth"

    0 comments No comments

  4. shockwaveriderz 61 Reputation points
    2020-11-28T18:48:45.567+00:00

    EDIT Update :

    ok I just ran the following 2 commands:

    Dism.exe /online /Cleanup-Image /StartComponentCleanup
    Deployment Image Servicing and Management tool
    Version: 10.0.18362.900

    Image Version: 10.0.18363.1110

    [=========== 20.0% ]
    The operation completed successfully.

    0 comments No comments