Windows 注册表(Windows Registry)是一个巨大的数据库,其中包含计算机上运行的程序、硬件和应用程序的配置设置。每次安装程序(install a program)时,它的值和键都嵌入在注册表中,您可以从中配置或执行故障排除步骤来修复损坏的程序。
当注册表维护不正确时,会发生注册表错误和损坏,从而导致操作系统中出现大量系统和应用(t)程序(he operating system)问题(problems in )。
本指南将向您展示注册表的工作原理、导致注册表错误的原因,并提供一些久经考验的解决方案,说明如何修复Windows 10中的注册表错误以使您的计算机再次正常工作。
Windows 注册表的工作原理(How The Windows Registry Works)
每当您在计算机上安装新程序时,注册表都会收到一组新的说明和文件引用,这些说明和文件引用会添加到该程序的特定位置。
操作系统会不断参考它以获取更多信息,例如文件位置、与程序一起使用的选项、安装新软件时、更改硬件等等。
不过,并非Windows中的所有应用程序都使用注册表。有些将其配置存储在XML文件中,而可移植类型将数据存储在可执行文件中。
要访问和配置注册表,您将使用注册表编辑器,这是自(Registry Editor)Windows 95以来每个(Windows 95)Windows版本默认包含的免费实用程序。
这个免费的注册表编辑实用程序不是注册表本身。这只是您可以查看和更改它的一种方式。您可以通过命令提示符(Command Prompt)访问它,并执行 regedit 命令。
或者,右键单击开始(Start)并选择运行(Run)。键入regedit.exe并单击OK或按键盘上的Enter打开注册表编辑器(Registry Editor)。
注册表中包含注册表值、注册表项和注册表配置单元。注册表值是包含在注册表项中的指令,这些注册表项是包含数据的文件夹。所有这些都可以在多个文件夹中找到,这些文件夹对子文件夹中的所有注册表数据进行分类,也称为注册表配置单元。
当您通过Editor更改值或键时,您实际上更改了由特定值控制的配置。这就是为什么对任何设置所做的更改也会对注册表中的相应区域进行,尽管其中一些在您重新启动计算机之前不会生效。
考虑到这一点,每次通过编辑器对注册表进行任何更改(changes to the registry)时,您都必须知道自己在做什么,这一点很重要。
注意(Note):在进行任何更改或修复损坏的注册表项之前,请确保备份注册表。
Windows 10 中注册表错误的常见原因(Common Causes of Registry Errors in Windows 10)
Windows 注册表(Windows Registry)有几种不同的方式在其中获取错误,这些不是注册表清理器可以解决的类型。事实上,注册表清理程序不会删除错误(registry cleaners don’t remove errors),只是他们在注册表中找到的一些不必要的条目。
注册表清理程序修复的一些“错误”包括空键或重复键、未使用的值以及从计算机中卸载软件后遗留的孤立注册表键。
真正的注册表错误表明您的计算机操作系统的注册表存在真正问题,这些错误是可能导致诸如注册表丢失或损坏、蓝屏死机、阻止 Windows 正常启动或提到 Windows 无法正常启动等问题的严重类型。 t 访问注册表。
在这种情况下,注册表清理程序将无法帮助修复Windows 10中的注册表错误。另外,如果没有有效的注册表,它根本无法做任何事情。因此,如果您在计算机上遇到此类错误,请不要安装注册表清理(install a registry cleaner)程序;它不会解决注册表问题。
正如我们已经说过的,注册表错误的某些原因,如注册表碎片、重复键、孤立条目和系统关闭错误,是不值得担心的。
但是,如果任何类型的恶意软件和病毒攻击和修改注册表,这将是一个巨大的问题,需要立即注意并采取行动。病毒、间谍软件和特洛伊木马(Trojans)会安装无法手动删除的注册表项。它们还通过更改文件关联来阻止您打开可执行文件,这就是您需要立即修复此类注册表错误的原因。
注册表损坏引起的问题(Problems Caused By a Corrupt Registry)
如果您的注册表已损坏,计算机可能无法重新启动。这通常发生在计算机关闭时,您无法跟踪其原因,因为它会在关闭期间卸载进程和驱动程序。
电源故障或意外关机也可能损坏注册表配置单元。在这种情况下,一个进程可能一直在修改注册表配置单元的一部分,并且意外关闭或电源故障突然停止了该进程。因此,注册表配置单元处于不一致状态,当您重新启动计算机时,操作系统将尝试加载配置单元但找到无法解释的数据,从而导致错误消息。
如果您的文件已损坏,或者您在写入磁盘(如处理器、缓存、RAM或磁盘控制器)时所涉及的硬件出现故障,这些也会损坏您的注册表以及计算机上的其他系统和数据。
注册表(Registry)损坏也可能在关机时发生,直到您尝试在下次重新启动时加载它时才会发现这一点。在这种情况下,hive 在关机时写入,并且该进程可能会在写入完全完成之前停止计算机中的组件或计算机本身。
如何修复 Windows 10 中的注册表错误(How to Fix Registry Errors in Windows 10)
- 备份您的注册表。
- 创建系统还原点。
- 从备份或还原点还原您的注册表。
- 使用系统文件检查器(System File Checker)扫描您的注册表。
备份您的注册表
我们关于如何备份和恢复 Windows 注册表的终极指南(ultimate guide on how to backup and restore the Windows Registry)更详细地介绍了这一点,但这里有一个快速的方法:
- 为此,请右键单击开始(Start)并选择运行(Run)。
- 在“运行”框中,键入regedit并单击“确定(OK)”或按键盘上的 Enter。
- 在注册表编辑器(Registry Editor)窗口中,右键单击左上角的计算机,然后单击(Computer)导出(Export)。
创建系统还原点
- 为此,请打开控制面板(Control Panel)并单击系统和安全(System & Security)。
- 在左侧,单击高级系统设置(Advanced System Settings)。
- 单击系统保护(System Protection)选项卡,选择创建,(Create,)然后按确定。
从备份或还原点(Backup Or Restore)还原您的注册表
- 为此,请返回“运行”(Run)窗口(右键单击“开始”> “运行”(Run))并键入regedit。按 OK 或按 Enter。
- 在注册表编辑器中,单击File>Import。
- 在Import Registry File弹出窗口中,选择保存备份的位置,单击文件并单击Open。
您也可以从还原点还原它。
- 为此,请单击开始(Start )并在搜索栏中键入创建还原点(create a restore point)。
- 从结果中选择创建还原点(create a restore point),然后选择系统还原(System Restore)。
使用系统文件检查器
系统文件检查器(System File Checker)( SFC ) 是一种工具,可检查您的驱动器是否存在任何注册表错误,并替换有故障的注册表。
- 要使用此工具,请打开命令提示符(Command Prompt)并选择以管理员身份运行(Run as administrator)。
预防措施
如果您希望将来的计算机没有注册表错误,您可以执行以下一些简单的操作:
- 正确卸载(Properly uninstall programs and apps)您不使用的程序和应用程序。除了使用“控制面板”中的“(Control Panel)Add/Remove Programs”窗口外,删除工具还可以帮助解决此问题。
- 运行定期病毒扫描并删除(delete any malware or related files)安装在注册表上的任何恶意软件或相关文件,从而导致系统中的程序崩溃。
- (Remove)使用注册表清理器删除不必要的注册表项并修复丢失的文件和ActiveX扩展。(ActiveX)
How to Fix Registry Errors in Windows 10
The Windows Registry is a huge database containing configυration settings for prоgrams, hardwarе, and applicationѕ running on your computer. Each time you install a program, its values and keys are embedded in the registry, from where you can configure or perform troubleshooting steps to repair a damaged program.
When the registry isn’t maintained properly, registry errors and corruption occur, causing lots of system and application problems in the operating system.
This guide will show you how the registry works, what causes registry errors, and offer some tried and tested solutions on how to fix registry errors in Windows 10 to get your computer working normally again.
How The Windows Registry Works
Whenever you install a new program on your computer, the registry receives a new set of instructions and file references, which are added in a specific location for the program.
The operating system constantly refers to it for more information such as file locations, the options to use with the program, when installing new software, altering your hardware, and so on.
Not all applications in Windows use the registry though. Some store their configurations in XML files while the portable type store data in executable files.
To access and configure the registry, you’ll use the Registry Editor, a free utility included by default with every Windows version since Windows 95.
This free registry editing utility isn’t the registry itself; it’s just a way through which you can view and make changes to it. You can access it via the Command Prompt, and execute the regedit command.
Alternatively, right click Start and select Run. Type regedit.exe and click OK or press Enter on your keyboard to open the Registry Editor.
Within the registry are registry values, registry keys, and registry hives. The registry values are instructions contained in registry keys, which are folders containing data. All these are found in several folders that categorize all registry data within subfolders, also known as registry hives.
When you make changes to the values or keys through the Editor, you actually change the configuration controlled by a specific value. This is why changes made to any setting are also made to the corresponding areas in the registry, though some of them don’t take effect until you restart your machine.
With this in mind, it’s important that you know what you’re doing each time you make any changes to the registry through the editor.
Note: Before you make any changes or fix broken registry items, make sure you backup the registry.
Common Causes of Registry Errors in Windows 10
There are several different ways that Windows Registry gets errors in it, and these aren’t the type that are solvable by a registry cleaner. In fact, registry cleaners don’t remove errors as such, just some unnecessary entries they find in the registry.
Some of the “errors” fixed by registry cleaners include empty or duplicate keys, unused values, and orphaned registry keys left over after you uninstall software from your computer.
The real registry errors, which indicate true problems with the registry of your computer’s operating system are the serious type that can cause issues such as a missing or corrupted registry, blue screen of death, preventing Windows from booting properly, or mention that Windows can’t access the registry.
In such situations, a registry cleaner is will fail to help fix registry errors in Windows 10. Plus, it can’t do anything at all without a working registry. Therefore, if you get such errors on your computer, don’t install a registry cleaner; it won’t fix registry issues.
As we’ve already stated, some causes of registry errors like registry fragments, duplicate keys, orphaned entries, and system shutdown errors are not worth worrying about.
However, if malware and viruses of any type attack and modify the registry, this is a huge problem and requires immediate attention and action. Viruses, spyware, and Trojans install registry entries that can’t be manually removed. They also prevent you from opening executable files by changing file associations, which is why you need to fix this type of registry error immediately.
Problems Caused By a Corrupt Registry
If your registry is corrupted, the computer may not restart. This usually happens when the computer is shut down, and you can’t track its cause because it unloads processes and drivers during shut down.
Power failure or unexpected shutdown can also corrupt the registry hives. In such cases, a process could’ve been modifying part of the registry hive and the unexpected shutdown or power failure abruptly stopped the process. Thus the registry hive is left in an inconsistent state, and when you restart your computer, the operating system will try loading the hive but find data that it can’t interpret, leading to error messages.
If your files are corrupted or you have faulty hardware that’s involved in writing to a disk like the processor, cache, RAM, or disk controller, these too can corrupt your registry and other system and data on your computer.
Registry corruption can also happen at shutdown, and you may not discover this until you try loading it at the next restart. In this case, the hive is written at shutdown, and the process may stop a component in the computer or the computer itself before the writing is fully completed.
How to Fix Registry Errors in Windows 10
- Back up your registry.
- Create a System Restore point.
- Restore your registry from the back up or restore point.
- Use the System File Checker to scan your registry.
Back Up Your Registry
Our ultimate guide on how to backup and restore the Windows Registry covers this in greater detail, but here’s a quick way to do it:
- To do this, right click Start and select Run.
- In the Run box, type regedit and click OK or press Enter on your keyboard.
- In the Registry Editor window, right click Computer at the top left-hand side, and click Export.
- Give the backup file a name and save it in a flash drive or cloud storage.
Create a System Restore Point
- To do this, open Control Panel and click System & Security.
- On the left side, click Advanced System Settings.
- Click System Protection tab, select Create, and press OK.
Restore Your Registry From The Backup Or Restore Point
- To do this, go back to the Run window (right-click Start>Run) and type regedit. Press OK or hit Enter.
- In the Registry Editor, click File>Import.
- In the Import Registry File popup, select where you saved the backup, click on the file and click Open.
You can also restore it from the restore point.
- To do this, click Start and type create a restore point in the search bar.
- Select create a restore point from the results and then choose System Restore.
Use The System File Checker
The System File Checker (SFC) is a tool that checks your drive for any registry errors, and replaces faulty registries.
- To use this tool, open a Command Prompt and select Run as administrator.
- Type sfc /scannow and press enter.
Preventive Measures
If you want a computer free of registry errors in future, here are some simple things you can do:
- Properly uninstall programs and apps you don’t use. A removal tool can help with this besides using the Add/Remove Programs window in Control Panel.
- Run regular virus scans and delete any malware or related files that install on your registry, causing programs in the system to crash.
- Remove unnecessary registry entries and repair missing file and ActiveX extensions using a registry cleaner.