The Windows registry is one place that should be left well-enough alone, but just for the sake of argument, what would happen if you deleted the entire thing? Today’s SuperUser Q&A post discusses the possibilities in order to satisfy a reader’s curiosity.
Today’s Question & Answer session comes to us courtesy of SuperUser—a subdivision of Stack Exchange, a community-driven grouping of Q&A web sites.
Screenshot courtesy of Wikipedia.
SuperUser reader SkYWAGz wants to know what would happen if the entire Windows registry was deleted:
I have been wondering what would happen if I deleted the entire Windows registry (using the following code for instance). Would my PC stop working?
- 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
What does happen if the entire Windows registry is deleted?
SuperUser contributors Daniel B and StW have the answer for us. First up, Daniel B:
You cannot delete the root nodes since they do not 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 am lazy), I get the following screen (the operating system is Windows XP):
(Translation: “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.
Followed by the answer from StW:
Windows stores a lot of critical information in the registry, which is loaded (at least a part of it) during an early stage while booting. If you remove this information, Windows will be unable to find and load critical system files and thus be unable to boot.
Such critical information is the list of device drivers needed for booting the system. This may include:
- Disk drivers (Floppies, Hard-Disks, CDs, USB Devices, …)
- Bus drivers (IDE, SATA AHCI, …)
- File system drivers (FAT, NTFS, …)
However, by default Windows stores a backup copy of the registry. If you have enabled System Restore, you can find such copies in the (hidden) System Volume Information Folder inside the root folder of the system partition. Additionally, even if you do not have System Restore enabled, Windows saves a backup copy of the registry in %WINDIR%\System32\config\RegBack\.
You can manually copy the backup files into %WINDIR%\System32\config\ to restore the registry data.
Have something to add to the explanation? Sound off in the comments. Want to read more answers from other tech-savvy Stack Exchange users? Check out the full discussion thread here.
- › How Wondershare PDFelement Enables Faster, Simpler, and Smoother PDF Editing Than Ever
- › How to See Which iPhone Apps Are Listening to Your Microphone
- › How to Use Microsoft’s “Money in Excel” to Manage Your Finances
- › How to Change Watch Faces on Apple Watch
- › How to See the Most Recent Updates Windows 10 Installed