[SOLVED] "The configuration registry database is corrupt." Windows 10 1803

morphly

New member
Joined
May 3, 2019
Posts
3
Hi there,

I have a Laptop with a corrupt COMPONENTS registry hive. Regback folder is empty unfortunately.
SFCFix, SFC and DISM throw errors after some seconds. COMPONENTS is not totally empty so I have hope that someone can fix it.

Please find cbs.log attached. COMPONENTS.ZIP uploaded here COMPONENTS.ZIP


Regards
 

Attachments

Managed to fix it myself.

Exported COMPONENTS hive with RegFileExport and imported it into a new clean hive.
 
Glad you were able to fix it on your own.

I am guessing you did something like the following?

Code:
Reg export "HKEY_LOCAL_MACHINE\COMPONENTS" "%UserProfile%\Desktop\Components.reg"
CleanComponents.bat
Reg import "%UserProfile%\Desktop\Components.reg"

But how did you make sure you imported it into "a new clean hive," e.g. CleanComponents.bat would have what in its place?


EDIT: For others who might have similar issues, I strongly advise reading the following before attempting repairs to the COMPONENTS hive: Restoring a Backup of the COMPONENTS Hive - What are the issues?
 
Last edited:
Basically what I did was the following:

Using RegFileExport from NirSoft (as normal windows tools would refuse to load the registry hive)
RegFileExport.exe [Path to broken COMPONENTS hive file] COMPONENTS.reg
Luckily this did not produce any errors and I did a quick check with notepad if the contents looks like a regular reg-file.
Then I created an empty reg hive to import to using this Powershell code Peter Hinchley : Create a New Registry Hive using PowerShell (comment out line 123)
reg load HKLM\TEMPHIVE [Path to empty hive file]
Open COMPONENTS.reg with an editor and search&replace all occurrences of "[HKEY_LOCAL_MACHINE\COMPONENTS" with "[HKEY_LOCAL_MACHINE\TEMPHIVE" - save the file
reg import COMPONENTS.reg
reg unload HKLM\TEMPHIVE


Then I copied/renamed the hive file to it's original destination and ran "sfc /scannow" successful. Also patches did instantly install properly afterwards
 

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

Back
Top