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,815 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: Most helpful
  1. shockwaveriderz 61 Reputation points
    2020-11-28T18:49:15.43+00:00

    S C:\Windows\system32> DISM /Online /Cleanup-Image /AnalyzeComponentStore
    Deployment Image Servicing and Management tool
    Version: 10.0.18362.900

    Image Version: 10.0.18363.1110

    [===========================60.0%== ]

    Error: 2

    The system cannot find the file specified.

    0 comments No comments

  2. shockwaveriderz 61 Reputation points
    2020-11-28T18:49:40.017+00:00

    Contents of the DISM.log :

    2020-11-28 13:31:30, Error DISM DISM Package Manager: PID=7956 TID=18960 Failed finalizing changes. - CDISMPackageManager::Internal_Finalize(hr:0x80070002)
    2020-11-28 13:31:30, Error DISM DISM Package Manager: PID=7956 TID=18960 Failed processing package changes with session option CbsSessionOptionAnalyzeStore - CDISMPackageManager::AnalyzeComponentStore(hr:0x80070002)
    2020-11-28 13:31:30, Error DISM DISM Package Manager: PID=7956 TID=18960 Failed to analyze component store. - CPackageManagerCLIHandler::ProcessCmdLine_CleanupImage(hr:0x80070002)
    2020-11-28 13:31:30, Error DISM DISM Package Manager: PID=7956 TID=18960 Failed while processing command cleanup-image. - CPackageManagerCLIHandler::ExecuteCmdLine(hr:0x80070002)
    2020-11-28 13:31:30, Info DISM DISM Package Manager: PID=7956 TID=18960 Further logs for online package and feature related operations can be found at %WINDIR%\logs\CBS\cbs.log - CPackageManagerCLIHandler::ExecuteCmdLine
    2020-11-28 13:31:30, Error DISM DISM.EXE: DISM Package Manager processed the command line but failed. HRESULT=80070002

    0 comments No comments

  3. Dave Patrick 426.2K Reputation points MVP
    2020-11-28T18:49:50.35+00:00

    You can also try an offline source, or something here may also help.
    https://learn.microsoft.com/en-us/troubleshoot/windows-server/deployment/cbs-log-file-record-entries-not-repaired-run-sfc

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

    0 comments No comments

  4. shockwaveriderz 61 Reputation points
    2020-11-28T19:55:50.633+00:00

    DSPatrick:

    I'm aware of that url. I am not getting any error messages in my cbs.log file from running sfc /scannow.....not any error messages from :

    Dism /Online /Cleanup-Image /CheckHealth
    Dism /Online /Cleanup-Image /ScanHealth

    only error messages from
    Dism /Online /Cleanup-Image /RestoreHealth

    in the dism.log file...

    sI'm also getting error messages in the dism.log file when I run :
    DISM /Online /Cleanup-Image /AnalyzeComponentStore

    One of the so-called fixes to this is to point it to either the .esd file or a .wim file using /sources , BUT the problem is , that the .esd or .wim has to be the exact version of the windows install that you have.
    you can't use a 1st version 1909 install .iso esd or iso, if you are above that version level like I am at 18363 .1110 win10pro 1909 and the .esd/.wim in the base 1909 is below 18363.1110.....Catch-22.