DISM RestoreHealth fail because an Invalid public key token

0

After some trouble with my OS (Windows 8.1 Professional N), i've decide to run the good old SFC /scannow, which found and repair some corrupted file.

The CBS log report:

2019-10-05 06:52:37, Info                  CSI    00000b2e [SR] Repairing 1 components
2019-10-05 06:52:37, Info                  CSI    00000b2f [SR] Beginning Verify and Repair transaction
2019-10-05 06:52:37, Info                  CSI    00000b30 [SR] Repairing corrupted file [ml:520{260},l:92{46}]"\??\C:\ProgramData\regid.1991-06.com.microsoft"\[l:106{53}]"regid.1991-06.com.microsoft_Windows-8.1-Pro-N.swidtag" from store
2019-10-05 06:52:37, Info                  CSI    00000b33 [SR] Repair complete
2019-10-05 06:52:37, Info                  CSI    00000b34 [SR] Committing transaction
2019-10-05 06:52:37, Info                  CSI    00000b39 [SR] Verify and Repair Transaction completed. All files and registry keys listed in this transaction  have been successfully repaired

A second scan did not find any integrity violation of sort.

I then try to use DISM, with the following command:

DISM /Online /Cleanup-image /RestoreHealth

but i get source files not found.

So i download a Windows 8.1 iso, and i check the version with my installation: winver e WIM info

After that, i use the appropriate command to execute DISM with a local source:

DISM /Online /Cleanup-Image /RestoreHealth /Source:wim:G:\sources\install.wim:1 /LimitAccess

But, again, i get the same error.

So i check the DISM.log file, and i found this error:

2019-10-05 14:20:40, Info                  DISM   DISM Package Manager: PID=2784 TID=1744  Error in operation: source for package or file not found, ResolveSource() unsuccessful. (CBS HRESULT=0x800f081f) - CCbsConUIHandler::Error
2019-10-05 14:20:40, Error                 DISM   DISM Package Manager: PID=2784 TID=7928 Failed finalizing changes. - CDISMPackageManager::Internal_Finalize(hr:0x800f081f)
2019-10-05 14:20:40, Error                 DISM   DISM Package Manager: PID=2784 TID=7928 The source files could not be found; their location must be specified using the /source option to restore the feature. - GetCbsErrorMsg
2019-10-05 14:20:40, Error                 DISM   DISM Package Manager: PID=2784 TID=7928 Failed processing package changes with session option CbsSessionOptionRepairStoreCorruption - CDISMPackageManager::RestoreHealth(hr:0x800f081f)
2019-10-05 14:20:40, Error                 DISM   DISM Package Manager: PID=2784 TID=7928 The source files could not be found; their location must be specified using the /source option to restore the feature. - GetCbsErrorMsg
2019-10-05 14:20:40, Error                 DISM   DISM Package Manager: PID=2784 TID=7928 Failed to restore the image health. - CPackageManagerCLIHandler::ProcessCmdLine_CleanupImage(hr:0x800f081f)
2019-10-05 14:20:40, Error                 DISM   DISM Package Manager: PID=2784 TID=7928 Failed while processing command cleanup-image. - CPackageManagerCLIHandler::ExecuteCmdLine(hr:0x800f081f)
2019-10-05 14:20:40, Info                  DISM   DISM Package Manager: PID=2784 TID=7928 Further logs for online package and feature related operations can be found at %WINDIR%\logs\CBS\cbs.log - CPackageManagerCLIHandler::ExecuteCmdLine

More in particular:

2019-10-05 14:20:40, Error DISM DISM Package Manager: PID=2784 TID=7928 The source files could not be found; their location must be specified using the /source option to restore the feature. - GetCbsErrorMsg

Even if i've just done that! So, because a couple line after the log report:

Further logs for online package and feature related operations can be found at %WINDIR%\logs\CBS\cbs.log

i open the CBS.log with Notepad++ (there was more than 11K line of logs in there) and i find a SYN in there.

Screenshot:

So, my question is: how this could happen? and of course How i can fix this?

Some more info: Windows update work fine (i guess), but lately i get some error message regarding remote procedure call just after login (with Task Manager and some time even with explorer, when i try to oper a folder, but just the first time). A couple time i get the same error when i put my password at login.

windows-8.1
public-key
dism
asked on Super User Oct 5, 2019 by PRiM

1 Answer

0

You should never run SFC /ScanNow before running DISM /Online /Cleanup-Image /RestoreHealth due to the fundamental purposes of both commands:

  • DISM's /RestoreHealth checks the backups of all system files contained within %WinDir%\WinSxS against known good copies from Windows' Update servers.
    • There are times when /RestoreHealth may fail due to a dirty Component Store [WinSxS]:
      DISM /Online /Cleanup-Image /StartComponentCleanup
  • SFC'S /ScanNow checks all system files within %WinDir% (excl. WinSxS) against the known good backup copies contained with WinSxS.

By running SFC first, the user has no idea if the backup files in the Windows Component Store, which is what SFC relies upon for hash comparison to check for corruption, are not corrupted;
DISM is what ensures this.

  1. Connect to internet
  2. DISM /Online /Cleanup-Image /StartComponentCleanup
  3. Internet Access:
    DISM /Online /Cleanup-Image /RestoreHealth

    No Internet Access or the above fails:

    • Mount the install.wim
      Normally contains 4 images, always containing at least 2 images

      Note:
      For a long time, DISM on Win8.1 couldn't source WIMs, erroring out when attempted.
      I'm unsure when / what KB applied the fix - to prevent confusion, I always recommend not sourcing a WIM directly, but mounting it and sourcing WinSxS directly.

      # Create Mount Directory:
        mkdir "C:\Mount"
      
      # Get image index for installed version of Windows:
        DISM /Get-WIMinfo /WIMfile:"Z:\install.wim"
      
      # Mount image index:
        DISM /Mount-Image /ImageFile:"Z:\Install.wim" /Index:<#> /MountDir:"C:\Mount" /ReadOnly
      
      # Specify WinSxS source for DISM:
        DISM /Online /Cleanup-Image /RestoreHealth /Source:"C:\Mount\Windows\WinSxS"
      
  4. SFC /ScanNow
answered on Super User Oct 5, 2019 by JW0914 • edited Oct 5, 2019 by JW0914

User contributions licensed under CC BY-SA 3.0