Let me just get one thing out straight away, importing a huge registry file like you did is a bad idea.
When you export keys to a .reg
file, you're simply creating a file that will contain instructions on how to re-create the keys you selected. Note that it will only take care of creating keys. Thus, when you later import the file, a merge will happen. Keys that don't exist in the registry any more will be re-created (which might be a horrible thing to happen) and keys that have changed will have their value overwritten (which might be just as horrible). Keys that were created from later boots of Windows will still exist after importing the .reg
file.
A .reg
file can even contain instructions to remove keys from the registry completely (although that won't be the case when exporting from the Registry Editor). So it is advisable to know exactly what a .reg
file contains and what it will do. With a 480 MB file, it's very unlikely that you'll be able to know what will happen when you parse it.
At this point, I have serious doubts if you will be able to recover from this and get everything back to a proper working state. Luckily, the result of this doesn't seem too catastrophic. Good luck! If you have shadow copies enabled, the guide How to Restore Previous Versions of the Registry in Windows 7 might help.
I know that there are several guides online (like the one on the Windows website) that treat the .reg
file export as a backup of the registry and, to some extent, it is. It represents a certain state of the registry at some point, but merging that state with a later state isn't really advisable (as you've just found out).
However, if I wanted to make a proper backup of the registry, I would copy the registry files from C:\Windows\System32\Config
. Those could simply be replaced later to fully replace the state of the registry.
Best Answer
You can’t delete the root nodes. They don’t physically exist. You can, however, delete their contents, via Regedit (as opposed to
reg
).Regedit hangs as soon as I try to delete
HKLM\SYSTEM
. After resetting the VM (because I’m lazy), I get the following screen (OS is Windows XP):(“Windows could not start because the following file is missing or corrupt: \WINXP\system32\config\SYSTEM”)
So yes, deleting stuff from the registry will absolutely positively kill Windows. And unless you have a backup, restoring it is impossible.