How to make a backup to save the registry values and keys and how to do a registry reset to bring them back to the initial valueIn every self-respecting blog, where we talk about Windows, there are always articles and guides that involve the system log, attention is always drawn to the fact that when is modified you have to be very careful and maybe make a backup to be used in case mistakes are made. The problem with the registry is that every change is automatically saved and, if wrong, can lead to errors or even the possibility that the PC stops working correctly.
This applies both to manual changes and also to automatic cleaning of some called programs registry Cleaner, which I have talked about in the past, but which I personally always recommend avoiding.
A backup of the registry it is useful for reverting the changes and returning to the previous situation, without having to reinstall everything. A reset of the registry keysinstead, it can be useful to restore Windows as it was after installation, undoing any changes made also through control panels, settings and other configuration screens.
What is the registry?The Windows registry is a hierarchical database that contains all the configurations and settings used by various components, services, applications and practically everything in Windows.
To understand how the registry works, you need to know two concepts behind this: keys and values. Registry Keys appear in the Key Editor as folders that include various values within them, which can be seen as files within folders, which contain the current settings.
As explained in another article on how modify registry keys, to open the editor, search for the regedit command from the Windows Start menu and execute it.
Simple registry backup and restoreThe simplest effective way to backup your system registry whenever there is a change to be made and that is to create a restore point.
As already explained, for create a restore point you just have to search, always from the search box of the Start menu of Windows 10, 7 and 8, the word "restore" and then click on Create a restore point. This saves the current state of the PC, so in case of problems you can always do a system restore and undo all the changes made on the file and on the system registry.
In Windows 10 and Windows 8 you can proceed with a system restore by entering the Windows 10 and 8 safe mode, by holding down the Shift key when clicking Restart from the PC lock screen.
Advanced registry backup and restore (for experts)To backup and save the system log for security and to be ready to restore it in case of changes, there are two ways.
The first is to open the registry editor by looking regedit from the search box on the Start menu, select the key you want to save, i.e. on one of the tree folders on the left and then go to File> Export and save the .reg file.
If we want instead save the entire registry, press the right mouse button on the Computer icon and select the Export item, so as to generate a reg file of the entire system registry.
This file, in addition to having a size greater than 300 Mega, cannot be restored. Trying to double click on the saved file that contains the entire registry, in fact, you receive an error that says that some keys are in use by Windows and cannot be changed.
To restore backups simple of the saved registry keys, just double-click on the previously saved .reg file and confirm the overwriting of the data. This way you can save certain registry keys so that you can easily restore them to go back after a change.
To restore a backup of the entire Windows registry instead, it is necessary to start the PC with a DVD or a USB key containing the Windows 10 installation file and then, without proceeding with the installation, we open the advanced options, start the command prompt and restore the reg file using the following commands:
X: (here the letter may be different, try typing C: and then run a dir command to see if it's the exact disk that contains your computer files and Windows folder)
copy config config_backup
copy configregback config /y
Automatic registry backup in Windows 10 and Windows 11The registry backup was automatic in Windows 10 until the Windows 10 1803 update in which Microsoft disabled the automatic registry backup feature of Windows 10 and Windows 11. To reactivate it, open a Windows command prompt from the Start menu (or a Powershell window) and run this command:
reg add "HKLMSystemCurrentControlSetControlSession ManagerConfiguration Manager" /v EnablePeriodicBackup /t REG_DWORD /d 1
Then restart your PC and Windows 10 will have created a scheduled task for automatic registry backup.
The folder where the automatic backup of Windows 10 is saved will be in the path inside the disk where the system is installed, in WindowsSystem32configRegBack.
How to restore the damaged registryIf our registry is damaged and we don't have backups, we can do a complete reset of the registry and restore it to the Windows factory settings by proceeding with Windows 10 reset, which is like a reinstall but it doesn't delete personal files and works great for clean Windows of all programs and errors.
As soon as the recovery window appears, simply select the Keep my files item to restore the registry (and the system itself), while keeping our personal files.
If the computer does not start, we can reset it from the advanced options menu, as seen in the guide If Windows 10 doesn't start, how to save everything and reinstall.
ConclusionsThe registry is a very delicate component of Windows and it is therefore advisable to always have backups at hand, so that you can restore them quickly in case of problems. The simplest method is to use system restore, but you can also back up just one key or back up the entire registry (restore from prompt to unboot system).
In another article we have reported a good program to restore registry keys: RefreshMyPC to restore registry keys to their original state.
Finally, if you want to make a real registry backup, you can use the Erunt program or Windows Registry Recovery, which are two of the programs to modify Windows registry keys more easily.