How to Fix BSOD REGISTRY_ERROR (0x00000051)
What error 0x00000051 means
The Windows registry is not one file but a set of files called hives — SYSTEM, SOFTWARE, SAM, SECURITY, and DEFAULT — that live in C:\Windows\System32\config\. Every time you log on, change a setting, or install an update, Windows is reading from and writing to these hives. When the kernel tries to read one of them and the file fails to load, verify, or complete a write, it triggers the REGISTRY_ERROR bug check, stop code 0x00000051, and halts the entire system rather than running on a half-loaded registry.
Microsoft's own bug check reference says this almost always indicates a registry I/O error caused by hardware problems or file system corruption. In other words, the registry itself is usually the victim, not the criminal. One stop code can come from very different root causes: an SSD with reallocated sectors slowly eating the SOFTWARE hive, a bad RAM stick flipping bits while the registry is being written to memory, or a Windows update that got interrupted and left a hive half-committed. Diagnosing 0x00000051 is therefore less about the registry and more about finding whatever sits underneath it that is breaking.
Common causes
- A failing system drive: reallocated sectors, pending sectors, or controller errors on the drive holding C:\Windows\System32\config\ — the most common single cause of REGISTRY_ERROR.
- Faulty RAM: a bad DIMM corrupts registry writes in flight; the hive is written to disk already damaged, and the next boot blue-screens.
- Interrupted Windows update: a power cut, dead laptop battery, or forced shutdown mid-update can leave the SOFTWARE or COMPONENTS hive partially written.
- File system corruption: logical errors on the system partition that make hive files unreadable even when the drive hardware is healthy.
- Registry filter drivers: some antivirus and backup suites install filter drivers that intercept registry operations — a conflicting or outdated one can break hive I/O.
How to fix error 0x00000051 — step by step
Work through these fixes in order, from least invasive to most. Step 1 gets you into a state where everything else can run safely, steps 2–5 resolve the large majority of cases, and step 6 covers the stubborn ones.
- Boot into Safe Mode first. REGISTRY_ERROR often happens because a hive file is locked or corrupted during normal startup. From the login screen, hold Shift while clicking Power > Restart, then go to Troubleshoot > Advanced options > Startup Settings > Restart and press 4 for Safe Mode. If Windows only reaches the blue screen, force the recovery screen by interrupting the boot three times in a row (power off while the Windows logo shows). Safe Mode loads a minimal registry and is where every later step should run.
- Scan the system drive with chkdsk. Open Command Prompt as administrator and run
chkdsk C: /f /r, then restart to let the scan complete. The registry hives live in C:\Windows\System32\config\, so a bad sector in that part of the drive can corrupt a hive and trigger 0x00000051 on every boot. The /f flag fixes file system errors and /r finds bad sectors and recovers readable data. If chkdsk reports unrecoverable bad sectors, the drive itself is failing and should be replaced. - Repair with DISM, then run SFC. In an elevated Command Prompt, run
DISM /Online /Cleanup-Image /RestoreHealthfirst, then runsfc /scannow, and finally runsfc /scannowonce more after DISM finishes. On Windows 10 build 1709 and newer and on Windows 11, DISM must run first because SFC pulls its repair sources from the component store that DISM fixes. These commands repair the corrupted system files and the SYSTEM and SOFTWARE hives that an interrupted update or a failing write can damage. - Test your RAM with Windows Memory Diagnostic. Search the Start menu for Windows Memory Diagnostic, choose Restart now and check for problems, and let it complete at least one full pass. Faulty RAM is a sneaky cause of REGISTRY_ERROR because the registry is constantly being read into and written out of memory — a bad DIMM flips bits during those writes and the hive is left inconsistent. If the tool reports hardware errors, test your sticks one at a time and replace the faulty one.
- Roll back with System Restore. If the crashes started after a Windows update or a driver install, boot into recovery (Shift + Restart from the login screen), choose Troubleshoot > Advanced options > System Restore, and pick a restore point dated before the first blue screen. System Restore reverts the registry hives to that earlier snapshot and is usually complete in 10 to 20 minutes. This is the fastest fix when a half-installed cumulative update left the SOFTWARE hive in an inconsistent state.
- Clean-boot, then reset if nothing helped. Search for msconfig, go to the Services tab, check Hide all Microsoft services, click Disable all, then open the Startup tab in Task Manager and disable all startup items — a clean boot tells you whether a third-party registry filter driver from an antivirus or backup suite is the culprit. Uninstall the suspect program and see if the crashes stop. As a last resort, go to Settings > System > Recovery and use Reset this PC, choosing Keep my files to reinstall Windows while preserving your data.
Did this fix it? Quick checklist
- PC boots into Safe Mode so repairs can run without locked hives
- chkdsk finished with no unrecoverable bad sectors on C:
- DISM and SFC completed clean; Windows Memory Diagnostic passed
- System Restore point applied or suspect driver uninstalled
If the blue screens continue after all six steps, open Event Viewer (Win + X > Event Viewer), go to Windows Logs > System, and look for BugCheck events around each crash — they can show which hive operation failed. Check the drive's SMART data with your manufacturer's tool too: crashes that survive repaired files, tested RAM, and rolled-back updates point at hardware that is actively dying, usually the drive, so keep your backups current and plan the replacement.
Frequently asked questions
What does REGISTRY_ERROR (0x00000051) mean?
It means the Windows kernel hit a severe problem with one of the registry hive files in C:\Windows\System32\config\ — the SYSTEM, SOFTWARE, SAM, SECURITY, or DEFAULT hive failed to load, read, or verify. Per Microsoft's bug check reference, this is usually a registry I/O error caused by hardware problems or file system corruption, not a problem you can fix by editing registry keys yourself. Windows throws the 0x00000051 blue screen because it cannot safely run on a half-loaded registry.
Is 0x00000051 caused by a failing hard drive?
Very often, yes — a failing drive is the most common single cause. Reallocated or pending sectors on the system drive corrupt the SOFTWARE and SYSTEM hives as they are read back, and the kernel responds with REGISTRY_ERROR. Run chkdsk C: /f /r and check the drive's SMART health data; if either reports unrecoverable bad sectors or the drive is clicking or pausing, back up your data and replace the drive before anything else.
Can a Windows update cause REGISTRY_ERROR?
Yes. A cumulative update that is interrupted — by a power cut, an unplugged laptop battery, or a forced shutdown — can leave the SOFTWARE or COMPONENTS hive half-written, and the next boot ends in 0x00000051. If the blue screens started right after an update, boot into recovery and use System Restore to roll back to a point before the update, then run DISM /Online /Cleanup-Image /RestoreHealth before retrying the update.
Will fixing 0x00000051 delete my files?
No. Booting into Safe Mode, running chkdsk, DISM, and SFC, testing your RAM, using System Restore, and clean-booting all leave your personal files untouched. Only the last-resort Reset this PC or a clean Windows reinstall would touch your data, and the reset option lets you keep your files. Still, back up anything important first — if the root cause is a dying drive, files can be damaged by the crash itself.