I accidentally deleted the whole HKEY_LOCAL_MACHINE\Software, my computer is now unable to boot. I have tried system recovery, startup fix, previous good condition and safe mode is not working. How to fix?
-
1Reinstall Windows.– DavidPostill ♦Aug 15, 2018 at 6:50
-
1Boot from another copy of OS (LiveCD for example). Find hive file in System volume information (from last savepoint) and replace "edited" hive file in system folder, than try to boot. If fail - reinstall only.– AkinaAug 15, 2018 at 6:55
1 Answer
You have two chances to restore a backup copy (if one exists). In either case, you will need to have some way to modify the filesystem, whether via the recovery boot environment (command prompt), a Windows installation USB (command prompt), or a Linux Live USB.
If you are lucky, you may be able to simply copy the backup file at
C:\Windows\System32\config\RegBack\SOFTWARE
overC:\Windows\System32\config\SOFTWARE
.If those backups are empty (
0KB
size), you may need to manually restore a System Restore snapshot. Basically:- From within
C:\System Volume Information\_restore{GUID}\RP#\Snapshot\
(where{GUID}
is a random string wrapped in braces, and#
is a number identifying the restore point from1
onwards) -- try to pick the most recent point - Copy the file
_REGISTRY_MACHINE_SOFTWARE
overC:\Windows\System32\config\SOFTWARE
You might also want to copy the others so you have a consistent snapshot rather than a newer/older
SOFTWARE
mismatch. From the KB:- Rename
_REGISTRY_USER_.DEFAULT
toDEFAULT
- Rename
_REGISTRY_MACHINE_SECURITY
toSECURITY
- Rename
_REGISTRY_MACHINE_SOFTWARE
toSOFTWARE
- Rename
_REGISTRY_MACHINE_SYSTEM
toSYSTEM
- Rename
_REGISTRY_MACHINE_SAM
toSAM
- Rename
- From within
If none of this works, you might be stuck with a reinstall.