Repair Corrupted Registry Hive
Problem:
Your registry is corrupt and Windows will not boot.
Solution 1:
Last Known Good
Solution 2:
If you had System Recovery turned on, you can restore the corrupted hive from the System Volume Information Folder as directed here.
Solution 3:
Open the registry hive on another computer and repair it.
With REGEDT32 one can load and edit offline registry databases:
- Start REGEDT32
- Highlight the HKEY_LOCAL_MACHINE-window and select the root of the tree
- In the menu select “Registry” -> “Load Hive“
- Select the wanted registry database file:
- [HKEY_LOCAL_MACHINE SYSTEM] (%windir%/system32/config/system)
- [HKEY_LOCAL_MACHINE SOFTWARE] (%windir%/system32/config/software)
- [HKEY_USERS .Default] (%windir%/system32/config/default)
- [HKEY_CURRENT_USER] (%userprofile%/ntuser.dat)
- When prompted for a name give it whatever name you like (etc. test1). The name will be used to create a new node in the tree so one can browse the offline registry.
- Go to the newly created node and edit whatever you like (The changes are written immediately to the offline registry database). One can import/export between the newly created node and the current registry just browse between the corresponding keys.
- To export a single key(with subkeys) into a file: Select the wanted key and in the menu “Registry” use “Save Key”.
- To import a single key or tree from a file: Select the location where the key should be imported and in the menu “Registry” use “Restore”. Be very careful to select the same location from which is was exported as the restore will erase everything below the import location and replace with the contents of the file.
- When finished editing select the newly created node and in the menu select “Registry” -> “Unload Hive“
This gives some possibilities:
- Load another users HKEY_CURRENT_USER (ntuser.dat) and change the users settings without logging in with the user.
- Load an offline registry database and extract settings to import in the current registry database.
- Load an offline [HKEY_USERS .Default] and change the login screensaver to Reset Administrator Password
- Load and edit the registry database on a parallel installation without needing to boot it first.
- Repair the registry without using a parallel installation:
- Use the Recovery Console to recover from faulty registry
- Boot Windows in safemode using the restored registry database
- Start REGEDT32 and load the faulty registry and edit away the faults
- Boot into the Recovery Console again to exchange the now hopefully fixed registry database back (winnt/system32/config)
- Boot Windows and it will now be using the fixed registry database