如果更改不准确,对Windows 注册表(Windows Registry)进行更改可能会对系统性能产生灾难性影响。Windows 注册表(Windows Registry)包含系统进程和应用程序的设置,以便它们可以正确运行,修改它们可能会对您的Windows 10系统造成不可挽回的损害,甚至可能导致您的计算机无法再次启动。
在这种情况下,您可能需要恢复注册表(Registry)备份以将 Windows 10 恢复到原来的状态。像这样的情况也可能是由于更新错误而引起的。Windows 创建的注册表(Registry)有一个自动秘密备份,但您必须手动启用它。今天,我们将向您展示如何使用命令提示符(Command Prompt)恢复注册表备份(restore a Registry backup)。
如何在Windows 11/10中使用命令提示符恢复(Command Prompt)注册表(Registry)
Windows 11/10中使用命令提示符恢复注册表(Registry)备份的主要步骤是:
- (Reboot)在高级(Advanced)启动选项屏幕中重新启动计算机
- Click Troubleshoot > Advanced Options > Command Prompt
- (Make)使用 dir 命令确保您位于Windows目录中(Windows)
- 接下来,使用 CD 命令将目录更改为 System32
- (Copy Registry)使用CMD从RegBack文件夹(RegBack)复制注册表文件
- 使用CMD将它们粘贴到System32\config
- 重启你的电脑。
现在让我们进入详细版本。
如前所述,您的注册表的备份副本存储(backup copy of your Registry stored)在该文件夹中,%windir%System32configRegBack
但我们必须使用命令提示符使该文件夹可访问并将数据库存储在此处。我们将在这里做的是从RegBack文件夹(存储所有更新的注册表(Registry)文件)中复制文件并将它们粘贴到该System32config
文件夹中。
如果您尝试在Windows 10计算机中找到并打开(Windows 10)RegBack文件夹,您会发现它是空的。Microsoft现在禁用了在(Microsoft)Windows 10上运行的系统的功能。您仍然可以让 Windows 10 自动备份注册表——但在这篇文章中,我们的方法将以命令提示符(Command Prompt)为中心。
首先(First),您必须在“高级启动(Advanced Startup)”选项下重新启动 PC。这样做很容易。关闭您在 PC 上运行的所有程序并打开您的Windows设置。单击(Click)Update & Security > Recovery,您将在Advanced Startup下找到(Advanced Startup)Restart Now 按钮。
一旦开始并出现高级启动(Advanced Startup)蓝屏,请单击疑难解答(Troubleshoot)。然后,选择Advanced Options并单击Command Prompt。这将以管理员身份在您的 PC 上运行命令提示符,第一个命令行是 X:WindowsSystem32。(Command)
现在,您需要访问安装Windows的驱动器。通常它是 C: 文件夹,这是每次打开命令提示符时都会执行的默认文件夹,但由于您已在恢复模式下启动 PC,它可能会更改为 D:。因此,键入以下内容并按Enter。
D:\
您可以使用 dir 命令确保您位于正确的目录中。如果目录显示Windows文件夹,如下所示,那么您的方向是正确的。如果没有,您将不得不尝试浏览其他驱动器。
接下来,输入以下命令进入System32文件夹,然后按Enter。
cd d:\windows\system32
现在,您必须创建一个文件夹作为配置文件夹中文件的临时备份。我们这样做是因为配置文件夹中也有注册表文件的副本。(Registry)为此,请键入以下命令行并按 Enter
mkdir configBak
这之后不会有任何操作,因为您在这里所做的只是创建一个备份文件夹。使用以下命令将文件复制到此文件夹中。输入后,您将看到 11-12 个文件被复制。等到(Wait)一切结束后再继续。
copy config configBak
要返回使用包含注册表文件备份的(Registry)RegBack文件夹,您必须使用如下所述的“cd”命令并使用“dir”来验证其内容:
cd config\RegBack
在浏览目录时,请注意文件的位大小。如果任何文件的大小显示为 0,则应该在此处停止该过程。继续操作可能会损坏您的 PC。
剩下要做的就是将文件从 config 文件夹复制到RegBack文件夹。以下复制命令将帮助您这样做。在移动这些文件的过程中,您会遇到有关是否要覆盖这些文件的问题。在每个问题上按 Enter(Press Enter)和 Y 键进行确认。
copy * ..\*
完成后,按“X”图标关闭窗口。之后,您的计算机将启动,如果您在启动系统时遇到任何问题,现在必须解决。我们希望我们的指南可以方便您浏览高级启动的命令提示符设置,并且您能够成功恢复计算机的注册表(Registry)。虽然此过程以Windows 11/10为中心,但类似的步骤似乎也适用于Windows 8.1和 7。
How to restore the Registry using Command Prompt in Windows 11/10
Making changes to Windows Registry can have catastrophіc effects on your system’s performance, іf not done accurately. The Windows Registry houses the settings for system processes and apps so that they can operate correctly and modifying them can cause irrevocable damage to your Windows 10 system, going to the extent where your computer may not even boot again.
In such scenarios, you may be required to restore your Registry backup to reinstate your Windows 10 to what it was. A situation like this may also arise out of a buggy update. There is an automated secret backup of your Registry that Windows creates but you have to manually enable it. Today, we will be showing you how to restore a Registry backup using Command Prompt.
How to restore Registry using Command Prompt in Windows 11/10
The main steps involved in restoring your Registry backup using the command prompt in Windows 11/10 are:
- Reboot your computer in the Advanced startup Options Screen
- Click Troubleshoot > Advanced Options > Command Prompt
- Make sure that you’re in the Windows directory by using the dir command
- Next, change the directory using the CD command to System32
- Copy Registry files from the RegBack folder using CMD
- Paste them into the System32\config folder using CMD
- Restart your computer.
Let us go into the detailed version now.
As already stated, there is a backup copy of your Registry stored in the folder %windir%\System32\config\RegBack
but we have to make use of the command prompt to make this folder accessible and store the database here. What we will do here is copy files from the RegBack folder (where all updated Registry files are stored) and paste them into the System32\config
folder.
If you try to locate and open the RegBack folder in your Windows 10 computer, you’ll find it to be empty. Microsoft disabled the functionality for systems running on Windows 10 now. You can still make Windows 10 automatically backup the Registry – but in this post, our method will center around the Command Prompt.
First things first, you will have to restart your PC under the Advanced Startup options. It’s pretty easy to do so. Close all the programs that you have running on your PC and open your Windows settings. Click on Update & Security > Recovery and you’ll find a Restart Now button under Advanced Startup.
Once that is underway and the Advanced Startup blue screen shows up, click on Troubleshoot. Then, select Advanced Options and click on Command Prompt. This is going to run Command prompt on your PC as an administrator with the first command-line being X:\Windows\System32.
Now, you need to access the drive where Windows is installed. Typically it’s the C:\ folder, which is the default folder under action every time the command prompt is opened, but since you’ve booted your PC in a recovery mode, it may change to D:\. Thus, type the following and press Enter.
D:\
You can make sure that you’re in the right directory by using the dir command. If the directory shows the Windows folder, as shown below, you’re going in the right direction. If not, you will have to try browsing through other drives.
Next up, type the following command to enter the System32 folder and press Enter.
cd d:\windows\system32
Now, you have to create a folder as a temporary backup of files on your config folder. We’re doing this because there is a copy of Registry files in the config folder too. To do so, type the following command line and press enter
mkdir configBak
This won’t be followed by any action since here all you’re doing is creating a backup folder. Copy files into this folder with the command below. Once entered, you will see 11-12 files being copied. Wait till that’s over before you proceed.
copy config configBak
To move back to working with the RegBack folder, which houses a backup of Registry files, you have to use the ‘cd’ command as prescribed below and use ‘dir’ to verify its contents:
cd config\RegBack
While going through the directory, keep an eye on the files’ bit sizes. If any of the files show 0 to be their size, you are supposed to stop the process right there. Continuing any further can cause damage to your PC.
All that’s left for you to do is copy the files from the config folder to the RegBack folder. The following copy command will facilitate you with doing so. In the process of moving these files, you’ll be posed with questions as to whether or not you want to overwrite the files. Press Enter and the Y key on every question to confirm.
copy * ..\*
Once done, close the window by pressing on the ‘X’ icon. After that, your computer will start up and if you were facing any problems booting your system, they must be solved now. We hope our guide made it convenient for you to navigate your way through the advanced startup’s command prompt setup and that you were able to restore your computer’s Registry successfully. While this process centered around Windows 11/10, similar steps seem to have worked for Windows 8.1 and 7 as well.