Restore Windows Registry – 3 Ways

Restoring the registry from an automatically created backup will help restore the operation of the Windows operating system in case of problems with the computer. This is one way to troubleshoot Windows crashes.

The Windows registry (system registry) is a tree-like hierarchical database of settings and parameters of the operating system. The operation of the operating system, programs, and computer hardware depends on the registry settings.

As a result of the actions of third-party software or viruses, changes occur in the Windows registry, which disrupts the operation of the operating system. Therefore, the user needs to restore the normal functioning of his PC.

Ways to restore Windows registry

If your computer starts to crash and malfunction, errors appear, you need to solve the problem: perform a system restore. There are several ways for the user to restore the entire system or individual Windows components.

Depending on the nature of the Windows problem, you can use the following troubleshooting methods:

  • Restoring Windows from a pre-created system backup.
  • Restore using a previously created Windows restore point .
  • Restoring the Windows Registry.
  • Checking and automatic recovery of Windows system files.

In the first two cases, you will need to have a backup system image or Windows restore points. After the restore, the system registry will be restored to the state it was in when the Windows backup or system restore point was created.

If a backup copy of the OS is not available, and the creation of Windows restore checkpoints has been disabled in the system settings, you will not be able to restore the system using these methods. Because there are no backup files to restore.

Automatic system file repair will not always solve the problem of crashes in Windows, because there may be other causes of problems on the PC.

Restoring the system registry can be performed from a previously created registry backup, or using a registry backup created automatically by system tools.

Restoring the registry from a previously created backup

This method is not very common due to the fact that users usually do not backup the registry, preferring other backup methods.

The disadvantage of this option is that an old copy of the registry may be available. After the restore process is completed, conflicts may occur on the computer between the old system settings and newly created settings that did not exist at the time the backup was created.

The user needs to back up the registry in advance. Read a detailed article on this on my website.

Run a system registry restore from a running Windows operating system:

  1. Select a registry backup on your computer.
  2. Right-click on the file with the “.reg” extension, select “Merge” from the context menu.

After a reboot, the system registry will be restored to the state it was in when the backup was created.

Automatic creation of an archive copy of the registry in Windows

The Windows Task Scheduler automatically backs up the registry once every 10 days in the “RegBack” folder located along the path:

C:\Windows\System32\config\RegBack

The “RegBack” folder contains the registry files: “DEFAULT”, “SAM”, “SECURITY”, “SOFTWARE” and “SYSTEM”.

The original registry files are located in the “config” folder located along the path:

C:\Windows\System32\config

If you encounter problems in the operation of Windows, corrupted registry files should be replaced with backup copies created automatically.

Restoring the Registry from the Windows RE Recovery Environment – Method 1

In a running Windows operating system, you will not be able to replace the registry files from a backup due to the fact that the system is running, you will be denied access.

To replace the registry files, you must boot the Windows Recovery Environment on your computer. Also, running WinRE is necessary if the system cannot be booted. You can start the Windows RE recovery environment in several ways, which are described in an article on my site.

This method restores the registry of Windows 7, Windows 8, Windows 8.1, Windows 10 up to and including version 1709. To find out what to do with the latest versions of the Windows 10 operating system, read this article to the end.

You can enter Windows RE from a running operating system, or boot from external media: the Windows Recovery Disk, from a bootable Windows flash drive, or from a DVD disc on which the Windows distribution is recorded.

In the recovery environment, we need the command line. The recovery environment interface is slightly different on different systems. In the tool selection window, click on the “Command Prompt” system tool.

If you are using a bootable USB flash drive or a Windows installation disk, in the Windows Setup program, in the second window, select “System Restore”, and then, among the suggested tools, the command line.

First we need to find out the name of the drive on which the operating system is installed, because in the recovery environment, the name (letter) of the system drive does not always match the name displayed on a running computer.

  1. In the command line interpreter window, type the command “diskpart” (without quotes), and then press the “Enter” key.
  2. Enter the command “list volume” (without the quotes) to list all disks on the computer.
In this case, the system drive “C:” has the same letter on the PC and in the Windows RE recovery environment.
  1. To exit the Diskpart utility, type “exit” (without quotes).

Run a registry restore from a backup copy:

  1. Run the command to copy the system registry files and replace the damaged files:
xcopy c:\windows\system32\config\regback c:\windows\system32\config
This command specifies the C: drive. If the recovery environment on your computer shows the system drive under a different drive letter, replace “C:” with the appropriate drive letter in both parts of this command.
  1. In the answer to the question, enter “a”, after which the registry files will be replaced.

Close the command prompt window, exit the WinRE recovery environment, restart Windows on the computer.

Restoring the registry using Windows RE – method 2

In the first case, we restored the registry files from a backup by running the command. The second way you can do the same by copying files.

  1. In the WinRE recovery environment, launch a command prompt.
  2. In the command prompt window, enter the command “notepad” (without the quotes) to launch the Notepad program.
  3. In the Notepad window, go to the “File” menu, select “Open …”.
  4. In the window that opens, enter the folders “Windows”, “System32”, “config” one by one.
  5. In the “Files of type” option, select “All Files”. In the folder you will see registry files: “DEFAULT”, “SAM”, “SECURITY”, “SOFTWARE”, “SYSTEM”.
  6. Add “.old” or “.bak” extension to filenames to rename them.
  7. Select the file, right-click on it, select “Rename” in the context menu, add the extension to the file name.
  8. Enter the “RegBack” folder, select the file.
  9. Use the keyboard shortcut “Ctrl” + “C” to copy the file from the “RegBack” folder.
  10. Open the “config” folder, paste the copied file there, using the “Ctrl” + “V” keys.

Exit the recovery environment, restart your computer.

Restoring the Windows 10 registry – 1 way

In the Windows 10 operating system, starting with version 1803, automatic registry backup has stopped working. In the Windows Task Scheduler, the backup function works, but there are no registry files in the RegBack folder.

In the Task Scheduler window, following the path: “Task Scheduler Library” → “Microsoft” → “Windows” → “Registry”, you can see that the registry backup task “RegIdleBackup” was scheduled here.

Changing the task start time on your own does not lead to anything, the registry is not saved, the RegBack folder is empty.

This was puzzling, users thought it was a system error. Some time later, Microsoft clarified the reason why it deliberately disabled registry backup.

This is done to save space on the system drive, because a significant number of users do not have enough free space to receive “large” OS updates. A controversial solution for saving 100-150 MB of disk space, depending on the size of the system registry.

What should Windows 10 users do? Create the “MyRegIdleBackup” task yourself to automatically create scheduled backups of the registry. As a result, the “MyRegBack” folder will be created, located in the “config” folder, in which archived copies of the registry files will be saved weekly.

  1. Run command prompt as administrator.
  2. In the command line interpreter window, run the command:
md %WinDir%\system32\config\MyRegBack & schtasks /create /ru system /sc weekly /st 19:00:00 /tn "MyRegIdleBackup" /tr "cmd /c del /f /q %WinDir%\system32\config \MyRegBack & cd /d %WinDir%\system32\config\MyRegBack & reg save HKLM\SAM SAM & reg save HKLMSECURITY SECURITY & reg save HKLM\SOFTWARE SOFTWARE & reg save HKLM\SYSTEM SYSTEM & reg save HKU\.DEFAULT DEFAULT"
In this command, you can change the time (now 19:00) to a more convenient one, and the folder for saving backup files.

To restore the registry from the recovery environment using the method described above, you must use the command:

xcopy c:\windows\system32\config\myregback c:\windows\system32\config

In Windows RE on your computer, if the system drive has a different name than “C:”, replace the name with your drive letter in this code. The registry files are copied from the “MyRegBack” folder.

Restoring the Windows 10 Registry – Method 2

The next method involves applying changes to the registry. Do the following:

  1. Launch the Registry Editor (in the search bar type “regedit”).
  2. In the “Registry Editor” window, follow the path:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Configuration Manager
  1. Right-click on the “Configuration Manager” section, select “New” in the context menu, then “DWORD (32-bit) Value”.
  2. Name the parameter: “EnablePeriodicBackup”.
  3. Right-click on the parameter, select “Edit…”.
  4. In the “Change DWORD (32-bit) Value” window, in the “Value” field, set “1”.
  5. Restart your PC.

You can use ready-made registry files that can be downloaded from here. Unzip the archive with two files with the “reg” extension.

To enable backup in Windows 10, run the “enable-periodic-registry-backup.reg” file. If you need to disable registry backup, run the “disable-periodic-registry-backup.reg” file.

After a periodic major update of Windows 10, you will need to apply the described changes again on the computer to enable the registry backup feature.

Article Conclusions

In the event of a problem with the Windows operating system, the user can restore the registry from a previously created archive copy, or from an archive copy automatically created by the system tool. Most often, recovery is performed from the Windows RE recovery environment, using the command line, running a command, or manually copying files.

Leave a Reply

Your email address will not be published. Required fields are marked *