[SOLVED] Server 19 KB5023702 Failed - COMPONENTS file corrupted

N0vajay05

New member
Joined
Mar 27, 2023
Posts
3
I haven't seen a totality of this procedure posted anywhere but a combo of posts on this and a few other forums got me to a fix for 3 - Server 2019 boxes that had a problem installing the latest KB5023702 update.

During install - update failure with error code 80073712

Went down the rabbit hole of finding SFC and DISM repairs saying resource protection error and 1009 corrupt errors.

Tried to add components file to registry via command and load hive - failed with error components is corrupted.

After trying several suggestions on this forum for this type of corruption and the fixes not working, this procedure finally worked for me:
  • Download RegFileExport - Export offline Registry file to .reg file of Windows. Copy to C:\
  • Copy file - C:\Windows\System32\config\COMPONENTS file to c:\
  • Run CMD as Admin, then command:
    • C:\>RegFileExport "c:\COMPONENTS" "c:\components.reg"
  • Load Powershell Function in Powershell ISE "ConvertTo-RegistryHive", found on this site -
  • Run function script, when finished run Command - ConvertTo-RegistryHive -Text (Get-Content c:\COMPONENTS.reg) -Hive c:\components.hive
  • Copy previous COMPONENTS file to desktop. Rename Component.hive to COMPONENTS (no extension)
  • Copy new COMPONENTS file to C:\Windows\System32\config\ (overwrite original)
  • Run REGEDIT
  • Click HKEY_LOCAL_MACHINE, Click File - Load Hive - Select C:\Windows\System32\config\COMPONENTS - Enter the name - COMPONENTS
  • Reboot and try update again
  • Once verified working, delete COMPONENTS backup file from desktop.

After doing this, I was able to pull the offending update that corrupted the components file (.net update KB5022782 according to CBS logs)

I'm sure there are parts of this that aren't the proper way to do it, but I'm happy that these servers and back to updating as usual again and no longer throwing registry corruption errors.
 
Last edited:
Welcome to Sysnative!

Thanks for sharing your solution and glad it worked for you.

I will however make a very important note for anyone else reading this! To follow these instructions you need to export the COMPONENTS hive as a .reg file. Whilst this contains all the data from the hive (keys, values etc), it does not contain any security or permissions information.

The COMPONENTS hive by default has various permissions applied to different keys and values. Since the .reg file contains no permissions data, when you recreate the hive file from the .reg file, all keys/values in the new hive will have the same (default) security information applied. Therefore all the security and permissions that should be applied to the COMPONENTS hive will be lost!

Whilst this might work for now, it can cause issues later on as permissions are not going to be as expected. It is also a security risk as keys that are intended to only be editable by certain users will now be editable by anyone.

To avoid this in the future, I’d recommend running the ComponentsScanner tool we maintain here (How to check your COMPONENTS registry hive for corruption) that can often detect & repair these kinds of error safely, without affecting hive permissions.

Again, glad your method worked for you, but just warning before others blindly follow without considering the side effects!
 
Hello Tekno Venus,

I was unaware of the permissions applied to the keys. Thanks for the heads up!

I'll attempt to use that tool on the next two before I do this procedure to see if it works. I'll update the original depending on findings.
 
I don't think I can update the original post anymore, but the ComponentsScanner tool fixed issue on the next two machines. Awesome tool! Thanks for the help.
 
I don't think I can update the original post anymore, but the ComponentsScanner tool fixed issue on the next two machines. Awesome tool! Thanks for the help.
Fantastic news! You're welcome
 

Has Sysnative Forums helped you? Please consider donating to help us support the site!

Back
Top