Hva skjer hvis du sletter hele Windows-registret?

Innholdsfortegnelse:

Hva skjer hvis du sletter hele Windows-registret?
Hva skjer hvis du sletter hele Windows-registret?

Video: Hva skjer hvis du sletter hele Windows-registret?

Video: Hva skjer hvis du sletter hele Windows-registret?
Video: Hvordan sende en kryptert epost med Office 365 🔒 - YouTube 2024, November
Anonim
Windows-registret er et sted som bør stå godt nok alene, men bare for argumentets skyld, hva ville skje hvis du slettet hele greia? Dagens SuperUser Q & A-innlegg diskuterer mulighetene for å tilfredsstille en lesers nysgjerrighet.
Windows-registret er et sted som bør stå godt nok alene, men bare for argumentets skyld, hva ville skje hvis du slettet hele greia? Dagens SuperUser Q & A-innlegg diskuterer mulighetene for å tilfredsstille en lesers nysgjerrighet.

Dagens Spørsmål & Svar-sesjon kommer til oss med høflighet av SuperUser-en underavdeling av Stack Exchange, en fellesskapsdrevet gruppering av Q & A-nettsteder.

Skjermbilde høflighet av Wikipedia.

Spørsmålet

SuperUser leser SkYWAGz vil vite hva som ville skje hvis hele Windows-registeret ble slettet:

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

Hva skjer hvis hele Windows-registeret er slettet?

Svaret

SuperUser bidragsytere Daniel B og StW har svaret for oss. Først opp, 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 HKLMSYSTEM. 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: WINXPsystem32configSYSTEM”)
(Translation: “Windows could not start because the following file is missing or corrupt: WINXPsystem32configSYSTEM”)

So yes, deleting stuff from the registry will absolutely positively kill Windows. And unless you have a backup, restoring it is impossible.

Etterfulgt av svaret fra 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%System32configRegBack.

You can manually copy the backup files into %WINDIR%System32config to restore the registry data.

Har du noe å legge til forklaringen? Lyder av i kommentarene. Vil du lese flere svar fra andre tech-savvy Stack Exchange-brukere? Sjekk ut hele diskusjonstråden her.

Anbefalt: