Server 2016 won't update

It returned "Error: 0x800f0805

The specified package is not valid Windows package."

I've attached the dism log file.
 

Attachments

I should imagine that it's because the Package doesn't exist under the Packages subkey which was one of my concerns.

Rich (BB code):
2022-04-12 22:04:10, Error                 DISM   DISM Package Manager: PID=6936 TID=3484 Failed opening package @Foundation. - CDISMPackageManager::Internal_CreatePackageByName(hr:0x800f0805)
2022-04-12 22:04:10, Error                 DISM   DISM Package Manager: PID=6936 TID=3484 Failed to get the underlying cbs package. - CDISMPackageManager::OpenPackageByName(hr:0x800f0805)
2022-04-12 22:04:10, Error                 DISM   DISM Package Manager: PID=6936 TID=3484 The specified package is not valid Windows package. - GetCbsErrorMsg
2022-04-12 22:04:10, Error                 DISM   DISM Package Manager: PID=6936 TID=3484 Failed to open the Foundation package. - CDISMPackageManager::OpenFoundationPackage(hr:0x800f0805)
2022-04-12 22:04:10, Error                 DISM   DISM Package Manager: PID=6936 TID=3484 The specified package is not valid Windows package. - GetCbsErrorMsg
2022-04-12 22:04:10, Error                 DISM   DISM Package Manager: PID=6936 TID=3484 Failed to open the Windows Foundation Package as a fall back. - CPackageManagerCLIHandler::ProcessCmdLine_GetFeatures(hr:0x800f0805)
2022-04-12 22:04:10, Error                 DISM   DISM Package Manager: PID=6936 TID=3484 Failed while processing command get-features. - CPackageManagerCLIHandler::ExecuteCmdLine(hr:0x800f0805)

SFCFixScript.txt
Warning: this fix is specific to the user in this thread. No one else should follow these instructions as it may cause more harm than good. If you are after assistance, please start a thread of your own.
  1. Download SFCFix.exe (by niemiro) and save this to your Desktop.
  2. Download the attached file, SFCFixScript.txt, and save this to your Desktop. Ensure that this file is named SFCFixScript.txt - do not rename it.
  3. Save any open documents and close all open windows.
  4. On your Desktop, you should see two files: SFCFix.exe and SFCFixScript.txt.
  5. Drag the file SFCFixScript.txt onto the file SFCFix.exe and release it.
  6. SFCFix will now process the script.
  7. Upon completion, a log should be created on your Desktop: SFCFix.txt.
  8. Copy (Ctrl+C) and Paste (Ctrl+V) the contents of this into your next post for me to analyse please - put [CODE][/CODE] tags around the log to break up the text.[/list]
 

Attachments

Code:
SFCFix version 3.0.2.1 by niemiro.
Start time: 2022-04-12 22:33:05.175
Microsoft Windows Server 10 Build 14393 - amd64
Using .txt script file at C:\Users\Administrator.WILBYS\Desktop\SFCFixScript.txt [0]




RegistryScript::
Failed to open registry key for second time HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages with error code ERROR_ACCESS_DENIED.
Failed to open registry key for second time HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages with error code ERROR_ACCESS_DENIED.
Failed to open registry key for second time HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages with error code ERROR_ACCESS_DENIED.
Failed to open registry key for second time HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages with error code ERROR_ACCESS_DENIED.

Failed to import registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\Microsoft-Windows-Common-Foundation-Package~31bf3856ad364e35~amd64~~10.0.14393.0.
Failed to import registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\Microsoft-Windows-Common-Foundation-Package~31bf3856ad364e35~amd64~~10.0.14393.0\Owners.
Failed to import registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\Microsoft-Windows-Foundation-Package~31bf3856ad364e35~amd64~~10.0.14393.0.
Failed to import registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\Microsoft-Windows-Foundation-Package~31bf3856ad364e35~amd64~~10.0.14393.0\Owners.

Failed to open registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\Microsoft-Windows-Common-Foundation-Package~31bf3856ad364e35~amd64~~10.0.14393.0 with error code ERROR_FILE_NOT_FOUND.
Failed to open registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages with error code ERROR_ACCESS_DENIED.
Failed to open registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\Microsoft-Windows-Common-Foundation-Package~31bf3856ad364e35~amd64~~10.0.14393.0\Owners with error code ERROR_FILE_NOT_FOUND.
Failed to open registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\Microsoft-Windows-Common-Foundation-Package~31bf3856ad364e35~amd64~~10.0.14393.0 with error code ERROR_FILE_NOT_FOUND.
Failed to open registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages with error code ERROR_ACCESS_DENIED.
Failed to open registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\Microsoft-Windows-Foundation-Package~31bf3856ad364e35~amd64~~10.0.14393.0 with error code ERROR_FILE_NOT_FOUND.
Failed to open registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages with error code ERROR_ACCESS_DENIED.
Failed to open registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\Microsoft-Windows-Foundation-Package~31bf3856ad364e35~amd64~~10.0.14393.0\Owners with error code ERROR_FILE_NOT_FOUND.
Failed to open registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\Microsoft-Windows-Foundation-Package~31bf3856ad364e35~amd64~~10.0.14393.0 with error code ERROR_FILE_NOT_FOUND.
Failed to open registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages with error code ERROR_ACCESS_DENIED.
RegistryScript:: directive failed to complete successfully.




Failed to process all directives successfully.
SFCFix version 3.0.2.1 by niemiro has completed.
Currently storing 8 datablocks.
Finish time: 2022-04-12 22:33:05.402
Script hash: X3IAxbwCcIxxbhGaNaMk8eowYw0HWJ1vwrkqWyhzn5k=
----------------------EOF-----------------------
 
I've applied the latest registry hive and running the dism command returns this:
Code:
Deployment Image Servicing and Management tool
Version: 10.0.14393.4169

Image Version: 10.0.14393.4169

Features listing for package : Microsoft-Windows-Foundation-Package~31bf3856ad364e35~amd64~~10.0.14393.0

(No features found for this package)

The operation completed successfully.
 
Could you please try and add a role and or feature as you were before? Please let me know if it fails.
 
Server manager now crashes at the same point that the error message used to appear
 
Okay, I'll attempt to reconstruct your Packages and PackageIndex subkeys using my VM and then provide you with the updated SOFTWARE hive.
 
After replacing your SOFTWARE hive with the version I provided you with over PM, please open an elevated command prompt and enter the following command again:

Rich (BB code):
DISM /Online /Get-Features

You should see a list of features installed, although, not all of them will be enabled.
 
Thanks, after replacing the software hive it does now return a list of features!

I've tried adding Windows Defender and it has failed with this error though:
1650401205279.png

I also tried searching for updates, when checking online for updates it got stuck at downloading updates 0%.
 

Attachments

  • 1650401076365.png
    1650401076365.png
    45.3 KB · Views: 1
Thanks, after replacing the software hive it does now return a list of features!
That's great!

I've tried adding Windows Defender and it has failed with this error though:
That error usually means that either there is a missing file or some form of registry corruption. Could you please provide your latest CBS log?
 
Rich (BB code):
2022-04-19 21:46:23, Info                  CSI    0000001d Changelist winner missing files - Windows-Defender-Management-Onecore, version 10.0.14393.0, arch amd64, nonSxS, pkt {l:8 b:31bf3856ad364e35}
[l:92]'protectionmanagement_unin_430f3e2a037e872f,protectionmanagement.dll,protectionmanagement.mof'
2022-04-19 21:46:23, Info                  CSI    0000001e Changelist winner missing files - Windows-Defender-Nis-Service, version 10.0.14393.0, arch amd64, nonSxS, pkt {l:8 b:31bf3856ad364e35}
[l:32]'niswfp.dll,nissrv.exe,nislog.dll'
2022-04-19 21:46:23, Info                  CSI    0000001f Changelist winner missing files - Windows-Defender-Service, version 10.0.14393.0, arch Host= amd64 Guest= x86, nonSxS, pkt {l:8 b:31bf3856ad364e35}
[l:61]'mpclient.dll,mpasdesc.dll,msmplics.dll,winshfhc.dll,mpoav.dll'
2022-04-19 21:46:23, Info                  CSI    00000020 Changelist winner missing files - Windows-Defender-Service, version 10.0.14393.0, arch amd64, nonSxS, pkt {l:8 b:31bf3856ad364e35}
[l:167]'mprtp.dll,thirdpartynotices.txt,mpclient.dll,mpcmdrun.exe,mpasdesc.dll,mpsvc.dll,msmpeng.exe,msmpcom.dll,msmplics.dll,mpazsubmit.dll,winshfhc.dll,mpcommu.dll,mpoav.dll'
2022-04-19 21:46:23, Info                  CSI    00000021 Changelist winner missing files - Windows-Defender-Management-V1, version 10.0.14393.0, arch amd64, nonSxS, pkt {l:8 b:31bf3856ad364e35}
[l:147]'mpprovider.dll,clientwmiinstall.mof,fepunregister.mof,ammonitoringprovider.dll,ammonitoringinstall.mof,amstatusinstall.mof,configsecuritypolicy.exe'
2022-04-19 21:46:23, Info                  CSI    00000022 Changelist winner missing files - Windows-Defender-Service-Datalayer, version 10.0.14393.0, arch amd64, nonSxS, pkt {l:8 b:31bf3856ad364e35}
[l:13]'datalayer.dll'
2022-04-19 21:46:23, Error                 CSI    00000023@2022/4/19:20:46:23.049 (F) onecore\base\wcp\componentstore\csd_winners.cpp(1288): Error STATUS_SXS_TRANSACTION_CLOSURE_INCOMPLETE originated in function OriginateFilesMissingError expression: (null)
[gle=0x80004005]

Could you please provide your latest COMPONENTS and SideBySide hive using the following instructions:

Retrieve Components Hive
1. Navigate to C:\Windows\System32\Config and locate the COMPONENTS file.
2. Please copy this file to your desktop.
Note: If you receive an error that this file is in-use, simply reboot your computer and try again.
3. Right-click on this file on your desktop and select Send To...Compressed (zipped) folder. This will create a file named COMPONENTS.ZIP on your desktop.
4. The file will likely be too large to upload here so please upload to a file sharing service. Examples of services to upload to are Dropbox or OneDrive or SendSpace and then just provide the link in your reply.

Export SideBySide
  1. Click on the Start button and in the search box, type regedit
  2. When you see regedit on the list, right-click on it and select Run as administrator
  3. When regedit opens, using the left pane, navigate to the following registry key and select it by clicking on it once.

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SideBySide
  4. Once selected, click File > Export....
  5. Change the Save as type: to Registry Hive Files (.)
  6. Name this file SxS (with no file extension) and save it to your Desktop.

Once done please upload this file via Dropbox or OneDrive or SendSpace.
 
Thank you, could you please run the following SFCFixScript using the usual instructions:

SFCFixScript.txt
Warning: this fix is specific to the user in this thread. No one else should follow these instructions as it may cause more harm than good. If you are after assistance, please start a thread of your own.
  1. Download SFCFix.exe (by niemiro) and save this to your Desktop.
  2. Download the attached file, SFCFixScript.txt, and save this to your Desktop. Ensure that this file is named SFCFixScript.txt - do not rename it.
  3. Save any open documents and close all open windows.
  4. On your Desktop, you should see two files: SFCFix.exe and SFCFixScript.txt.
  5. Drag the file SFCFixScript.txt onto the file SFCFix.exe and release it.
  6. SFCFix will now process the script.
  7. Upon completion, a log should be created on your Desktop: SFCFix.txt.
  8. Copy (Ctrl+C) and Paste (Ctrl+V) the contents of this into your next post for me to analyse please - put [CODE][/CODE] tags around the log to break up the text.[/list]

    If it is successful, then please attempt to add the Windows Defender feature again. Otherwise, please provide the latest CBS log.
 

Attachments

Please find attached the latest cbs log and the sfcfix files. It gave the same error when trying to install defender as in post #49.
 

Attachments

Windows defender installed this time, thanks!

I couldn't seem to turn it on though, I did also notice that "GUI for Windows Defender" wasn't an option to install but it is for all my other server 2016 servers, could that be why?

1650494829987.png
 
You may have a few other feature packages missing. I'll have to have a look on my Server 2016 VM for you.
 
Could you please provide the latest copy of CBS hive?

Export CBS hive
  • Click on the Start button and in the search box, type regedit
  • When you see regedit on the list, right-click on it and select Run as administrator.
  • When regedit opens, using the left pane, navigate to the following registry key and select it by clicking on it once.

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing
  • Once selected, click File > Export....
  • Change the Save as type: to Registry Hive Files (.).
  • Name this file ComponentBasedServicing (with no file extension) and save it to your Desktop.
  • Right-click on the saved file and choose Send To -> Compressed (zipped) Folder.
  • Attach the .ZIP file to your next post.
  • If the file is too large to upload here, upload to Dropbox or OneDrive or SendSpace and just provide the link here.
 
Back
Top