Windows – What happens when I delete the entire Windows registry

windowswindows-registry

I've been wondering what would happen if I delete all the registry stuff. Would my PC stop working?
Edit: I've edited the code, now it should delete the registry.

cd %TMP%
reg query HKCR> RegTest.txt
reg query HKCU>> RegTest.txt
reg query HKLM>> RegTest.txt
reg query HKU>> RegTest.txt
reg query HKCC>> RegTest.txt
@pause && cls
for /f "delims=" %%I in (RegTest.txt) do reg delete "%%I" /va /f

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):

enter image description here

(“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.

Related Question