This tool will help you fix broken registry hives.
Examples:
- BAD_SYSTEM_CONFIG_INFO blue screen
- ERROR_BADDB when using DISM/after a bad Windows Update
Releases page has the latest Windows build. For other platforms see "Build instructions"
regfixup 1.1 (https://github.com/helloryuko/regfixup)
fix broken registry hives with desynchronized sequence numbers or wrong checksum
usage: regfixup [hive file location]
optional parameters:
-h show this help message
-p prefer primary sequence number
-s prefer secondary sequence number
-c only recalculate checksum
return codes:
0 fixup successful or not required
1 can't open file
2 file isn't a regfile
3 invalid parameters
- Boot into a Windows installation medium
- Choose language and click "Repair options"
- Click "Command Prompt"
- Enter
dism /cleanup-image /restorehealth /image:C:, where C: is the disk with your broken Windows installation
- If you have an error about scratch partition, create a folder on some disk with
mkdir C:\somefolderand add a/scratchdir:C:\somefolderparameter to DISM
- The check should fail and it will output "The DISM log file can be found at ..."
- Enter
notepad <path to log file>without the brackets - Search for "ERROR_BADDB" in the file
- You will find a string that looks something like this:
Failed to load offline SOMETHING hive. The word instead SOMETHIHNG is your hive.
!!! WARNING !!! Do a backup of your C:\Windows\System32\config folder before proceeding! Don't blame me if something broke and you don't have a backup :)
- Somehow obtain a copy of regfixup. You can drop it into your pendrive besides your Windows installer
- Enter
X:\regfixup.exe C:\Windows\System32\config\YOUR_HIVE_NAME, where YOUR_HIVE_NAME is your hive name (duh) - Choose either primary or secondary sequence
- Reboot, you can do that with
wpeutil rebootcommand
- Download any C compiler and CMake
- Create
buildfolder cd buildcmake ..cmake --build .
- Download Visual Studio
- Open "Developer Command Prompt"
cl regfixup.c
- Install either clang or gcc
- Open terminal
clang regfixup.c -o regfixuporgcc regfixup.c -o regfixup