windows 删除注册表_如果删除整个Windows注册表会怎样?

windows 删除注册表

windows 删除注册表

what-happens-if-you-delete-the-entire-windows-registry-00

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.

Windows注册表是一个应该单独保留的地方,但是仅出于争论的目的,如果删除整个内容,将会发生什么? 今天的超级用户问答环节讨论了各种可能性,以满足读者的好奇心。

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.

今天的“问答”环节由SuperUser提供,它是Stack Exchange的一个分支,该社区是由社区驱动的Q&A网站分组。

Screenshot courtesy of Wikipedia.

屏幕截图由Wikipedia提供

问题 (The Question)

SuperUser reader SkYWAGz wants to know what would happen if the entire Windows registry was deleted:

超级用户阅读器SkYWAGz想知道如果删除整个Windows注册表会发生什么:

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?

我一直想知道如果删除整个Windows注册表(例如,使用以下代码)会发生什么情况。 我的电脑会停止工作吗?

  • cd %TMP%

    cd%TMP%
  • reg query HKCR> RegTest.txt

    reg查询HKCR> RegTest.txt
  • reg query HKCU>> RegTest.txt

    reg查询HKCU >> RegTest.txt
  • reg query HKLM>> RegTest.txt

    reg查询HKLM >> RegTest.txt
  • reg query HKU>> RegTest.txt

    reg查询HKU >> RegTest.txt
  • reg query HKCC>> RegTest.txt

    reg查询HKCC >> RegTest.txt
  • @pause && cls

    @pause && cls
  • for /f “delims=” %%I in (RegTest.txt) do reg delete “%%I” /va /f

    对于/ f(RegTest.txt)中的“ delims =” %% I,请执行reg删除“ %% I” / va / f

What does happen if the entire Windows registry is deleted?

如果删除整个Windows注册表会怎样?

答案 (The Answer)

SuperUser contributors Daniel B and StW have the answer for us. First up, Daniel B:

超级用户贡献者Daniel B和StW为我们找到了答案。 首先,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(而不是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):

我尝试删除HKLM \ SYSTEM时,Regedit会挂起。 重置VM之后(由于我很懒),我得到以下屏幕(操作系统是Windows XP):

what-happens-if-you-delete-the-entire-windows-registry-01

(Translation: “Windows could not start because the following file is missing or corrupt: \WINXP\system32\config\SYSTEM”)

(翻译:“ Windows无法启动,因为以下文件丢失或损坏:\ 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.

因此,是的,从注册表中删除内容绝对可以完全杀死Windows 。 而且,除非您有备份,否则还原是不可能的。

Followed by the answer from StW:

随后是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.

Windows在注册表中存储了许多关键信息,这些信息在启动时的早期就被加载(至少是其中的一部分)。 如果删除此信息,Windows将无法找到和加载关键系统文件,因此将无法启动。

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, …)

    磁盘驱动程序(软盘,硬盘,CD,USB设备等)
  • Bus drivers (IDE, SATA AHCI, …)

    总线驱动程序(IDE,SATA AHCI等)
  • File system drivers (FAT, NTFS, …)

    文件系统驱动程序(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\.

但是,默认情况下,Windows存储注册表的备份副本。 如果启用了“系统还原” ,则可以在系统分区的根文件夹内的(隐藏)“系统卷信息文件夹”中找到此类副本。 此外,即使没有启用系统还原,Windows也会将注册表的备份副本保存在%WINDIR%\ System32 \ config \ RegBack \中。

You can manually copy the backup files into %WINDIR%\System32\config\ to restore the registry data.

您可以手动将备份文件复制到%WINDIR%\ System32 \ config \中,以还原注册表数据。



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.

有什么补充说明吗? 在评论中听起来不错。 是否想从其他精通Stack Exchange的用户那里获得更多答案? 在此处查看完整的讨论线程

翻译自: https://www.howtogeek.com/200652/what-happens-if-you-delete-the-entire-windows-registry/

windows 删除注册表