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,802 questions
0 comments No comments
{count} votes

Accepted answer
  1. Joy Qiao 4,891 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.

    5 people found this answer helpful.

13 additional answers

Sort by: Newest
  1. shockwaveriderz 61 Reputation points
    2021-09-28T17:46:09.307+00:00

    I use:

    findstr /c:"[SR]" %windir%\logs\cbs\cbs.log >"%userprofile%\sfcdetails.txt"
    type "%userprofile%\sfcdetails.txt
    pause

    place the above in a text file and call it scannow.cmd

    this will show all the {SR} entries that are created by running scannow /sfc

    this will help identify what files are being repaired or unable to be repaired

    when you run sfc scannow it writes its results to cbs.log the above command syntax reads that cbs.log file and writes just the {SR} entries in cbs.log to sfcdetails.txt

    0 comments No comments

  2. Docs 15,151 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.

  3. Docs 15,151 Reputation points
    2021-09-27T21:28:13.633+00:00

    Over time I've found that an in place upgrade repair to be the most efficient method for for fixing 0x800f081f.

    https://www.tenforums.com/tutorials/16397-repair-install-windows-10-place-upgrade.html
    https://www.tenforums.com/tutorials/9230-download-windows-10-iso-file.html
    https://www.microsoft.com/en-us/software-download/windows10

    .
    .
    .
    .
    .
    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
    .
    .
    .
    .
    .


  4. 54988485 96 Reputation points
    2021-09-27T18:02:59.57+00:00

    All the Dism advice to fix Windows 10 21H1 failed for me apart from these two used consecutively:

    dism.exe /Online /Cleanup-Image /AnalyzeComponentStore

    This command will tell you whether or not you need to run the following command:

    dism.exe /Online /Cleanup-Image /StartComponentCleanup

    advice credit to above user: shockwaveriderz