The registry is a huge data repository that contains all sorts of parameters that allow the Windows 7 OS to work stably. If you make incorrect changes to the system database or damage any registry sectors (for example, when your computer turns off spontaneously), various types of malfunctions may appear in the system. operation of the system. In this material we will figure out how to restore the system database.

PC malfunctions are also possible after installing software solutions that require changes to be made in the system database. There are also situations when a user accidentally deletes an entire registry subsection, which leads to unstable operation of the PC. To fix such problems, you need to restore the registry. Let's look at how this can be done.

Method 1: System Restore

A time-tested method for troubleshooting registry problems is a system restore, which will work if you have a restore point. It is also worth noting that various data that was recently saved will be deleted.

After this procedure, the process of restoring the system database will occur.

Method 2: System Update

To perform this method, you will need a bootable USB flash drive or disk.

After inserting the installation disk (or flash drive), we launch the Windows 7 installation program. The launch is carried out from a system that is in a working state.

The Windows 7 system directory will be overwritten (the registry is located in it), user settings and confidential personal settings will be untouched.

Method 3: Boot-time recovery


Method 4: "Command Line"

We carry out the procedures that were described in the third method, only instead of recovery we click on the sub-item "Command line".


Method 5: Restoring the registry from a backup

This technique is suitable for users who have a registry backup created via "File""Export".

So, if you have this copy, perform the following steps.


Once the files have been copied, the registry will be restored to working condition.

Using these methods, you can restore the registry to working condition. I would also like to note that from time to time it is necessary to create restore points and registry backups.

As we mentioned earlier, in some cases when inconsistencies are detected in the registry, for example, incorrect data was recorded, the system will attempt to self-heal during the boot process.

Although poorly written software or drivers do not actually pollute the registry, they do cause the registry to become unstable due to their chaotic areas that, when available, create system problems. To help keep the registry in a reliable state, Windows provides several useful tools, including System File Checker, Chkdsk, System Restore, and Driver Rollback. You can also use third-party utilities to repair, clean and defragment the registry.

System File Checker (SFC), a fairly old tool that is still used on modern operating systems, uses an administrative command line to operate. SCF verifies the integrity of every existing system file within a Windows installation, including Internet Explorer.

A damaged Windows system file leads to system instability and security vulnerabilities, as well as suboptimal performance during normal operation.

To call SFC, follow these steps:

  • Insert the Windows installation DVD (but don't run it).
  • Open an administrative command prompt.
  • Type sfc /scannow and press Enter.

SFC comes with all versions of Windows, but if you are trying to run SFC on a system updated with one or more service packs, you will have to prepare a DVD (or ISO image) with Windows installation files that include service patches. This is necessary so that SFC checks and uses SP versions of system files to replace damaged ones.

Attention. The SFC check takes a long time. SFC, to ensure the integrity and restore the found damaged system file, checks each file in the system.

SFC is not intended for regular troubleshooting use, only consider it when you encounter system instability issues.

Another well-known tool is Check Disk (ChkDsk and Chkntfs), which scans computer hard drives for errors and fixes them. The tool requires administrator credentials to run because it runs on low-level hardware and must have special disk access if installation issues occur.

To run ChkDsk, open an administrative command prompt, type the following command and press Enter.

Running the ChkDsk program on the system drive will schedule the task the next time the system is rebooted.

Any hard drive that stops reading or writing data correctly will most likely lead to file corruption on the system. Typically, if the system detects corrupted data files, it will result in some data loss and ultimately require the user to restore their files from a backup or file history. You should be interested in saving your registry files carefully, as this will cause your system to hang or, worse, crash.

Whenever Windows tries and fails to read data from a corrupted system file, page file, or registry, Windows displays an error message commonly known as the Blue Screen of Death. If this happens, you should immediately determine whether this is an isolated incident or whether the blue screen is an early sign of a likely disk failure, which will lead to rapid spread of file corruption and Windows instability. A media failure may seem catastrophic, and it is, but typically it will display the above errors for a while, which is a typical symptom of failed unusable sectors. Most bad sectors are the result of physical damage such as overvoltage, physical damage or manufacturing defects.

Software tools such as ScanDisk and CHKDSK are offered to the user to attempt data recovery. As a rule, once a bad sector is identified, the system marks it as bad and excludes its use for recording data.

In Windows 8.1, Chkdsk runs automatically in the background and actively monitors the health of NTFS volumes.

If the system detects a damaged file, NTFS running Windows OS independently solves most problems without requiring additional special tools, such as a recovery disk.

Attention. Under normal operating conditions, if you are using Windows 8.1, you will not need to run Chkdsk, since the operating system itself monitors the file system for damage and the hard drive for damaged sectors and eliminates problems in the background.

CCleaner

Although we have already talked about the popular CCleaner tool from Piriform, in this article it is worth recalling it again in relation to solving general registry corruption issues.

As previously stated, when any software application or device driver is installed or uninstalled on a computer, there are bound to be problems with remaining fragments of incomplete or outdated records.

CCleaner will perform some or all of the following activities:

  • Scan the registry for unwanted/malicious entries
  • Remove unwanted/malicious entries to combat registry bloat
  • Remove or replace outdated files
  • Create registry backups
  • Remove incorrect file and program associations
  • Restore the registry if any maintenance task fails
  • Defragment the registry to remove any free spaces
  • Repair or remove system files such as unused or shared DLL files, find no longer needed device drivers and old ActiveX files
  • Creates a scan schedule to ensure the registry is scanned and errors are automatically repaired.

Many third-party registry cleaner utilities remove unnecessary bloat and keys that are no longer relevant to the current system, and then defragment the registry files.

The Windows 7 registry is a specially ordered system database that stores hardware profiles, boot and operation parameters of the OS itself, data about user accounts, information about software, etc. The “seven” registry consists of several sections, which are mainly partly dynamically created from the default, sam, system, security and software files (without extension) stored in the C:WindowsSystem32config folder. The presence and safety of these files ensure the functionality of the registry, without which Windows 7 cannot exist.

The registry is one of the most important “organs” of the operating system, but at the same time it is completely open, that is, any user with administrative rights can make any changes to it. What about the user, every program that is installed on a computer writes and reads data from the registry. But among the programs there are a lot of unwanted (for example, advertising) and downright harmful (viruses and Trojans). They also “do not disdain” to leave their autograph in the system registry, ensuring automatic startup without the user’s knowledge or disrupting the performance of Windows.

Because of this openness, Windows 7 has fairly robust registry protection mechanisms. This:

  • creating system restore points (automatically and scheduled), where a copy of the registry is saved;
  • creating a backup copy of a disk image with a working registry;
  • also, once every 10 days, a backup copy of the five main system registry files is created on a schedule - it is stored in the C:WindowsSystem32configRegBack directory.

Programs for working with the registry and restoring it

Regedit (Windows Registry Editor)

There are a lot of different software to access and edit the Windows registry. Windows 7 also has its own utility for this - Regegit.exe, with which you can copy both the entire registry and individual sections and subsections in order to use them if recovery is necessary.

  • To create a backup copy of the entire registry, open the utility by typing the command in the Start search bar regedit and running the found file. To proceed further, your account must have administrator rights.

  • Expand the “File” menu and select the “Export” command from it.

  • In the Explorer window, in the “Registry range” section, check the “Entire registry” checkbox. The copy file will have the extension .reg - this data format will allow you to restore the registry with one click on this file.

The disadvantage of this method is that recovery is only possible when the system boots normally. The next tool we'll look at can repair the Windows registry when it starts up corrupted.

ERUNT program

The ERUNT utility has slightly greater potential than the previous one. With its help, you can save and restore the registry regardless of whether the system is booting or not. To restore Windows 7 that won't boot, you will need an external emergency boot disk, for example, BartPE or Alkid LiveCD. But you can also use the recovery environment. In these cases, the program must be installed on the hard drive in advance, and a backup copy of the registry must already be created.

Creating a registry backup

  • Download, install and upload ERUNT. Mark the registry keys that you want to create copies of (it is suggested to save system and user data or some other branch). Specify the save location (by default this will be the ERDNT folder in C:Windows) and confirm your choice.

  • The backup process will take a few minutes.


Restoring the registry from a backup in a running Windows 7

  • Open the folder where the ERUNT program saved the created copy (C:WindowsERDNTdate) and run the file ERDNT.EXE as an administrator.

  • Confirm that you agree to restore, select the partition you want to restore, and then click OK.


Recovery using ERUNT when Windows 7 won't start

  • Boot your computer from media that has a portable version of Windows installed. If the partition letter of the system partition that needs to be restored has changed (this is most likely the case when booting from external media), open the folder where the registry backup and the recovery component ERDNT.exe are located. Find the ERDNT.inf file here and open it with Notepad.
  • If the letter of the Windows 7 partition on your hard drive has changed, for example, to F, correct all paths from C:Windows to F:Windows in ERDNT.inf and save the file.

  • Run ERDNT.exe, select the partitions you need to restore and click OK.

Restoring the registry using ERUNT from the recovery environment

If the system does not boot and you do not have a suitable rescue disk at hand, you can use the Windows 7 recovery environment. The ERDNT graphical shell does not work in this environment, so the program will have to be launched through the command console.

  • To load the recovery environment before starting Windows, quickly press the F8 key several times. From the boot methods menu, select Troubleshoot your computer.

  • Follow the instructions and log in as an administrator.

  • Select Command Prompt from the list of options.

  • Enter the command: cd C:WindowsERDNT(after cd you need to specify the path to the folder where the ERDNT program is located). After this and each subsequent command you need to press Enter.
  • If the registry backups are in separate subfolders, enter the command dir to display the entire list of subdirectories of the ERDNT folder in the console.
  • Enter the selected subfolder by entering the command cd folder_name, For example, cd 1.09.2014.
  • To start the recovery process, enter the command batcherdnt.con, a few minutes after this, the program will restore the registry and restart the computer.

  • If you had the boot backup option enabled (in ERUNT), use the command cd autobackup the program will restore one of the latest registry backups.

The ERUNT program is a reliable and time-tested tool for saving and quickly restoring the Windows registry. Many users prefer to replace the standard system restore function with it, since it practically does not crash, does not consume system resources and does not require a large amount of free space on the hard drive. Quite a reasonable decision.

The registry is a large database that stores all the parameters necessary for the normal operation of the operating system. You can view it through the registry editor, which is available in Windows. Any user can log in if their account has administrator rights.

And if you made any changes, or the computer turned off by itself, for various reasons, or you accidentally pressed the wrong key and deleted a parameter or an entire registry branch, then this may not have the best effect on the operation of the computer.

And yet, if this happens, let's figure out what ways there are to restore the Windows 7 and Windows 8 registry so that the computer can operate normally.

Using a backup

As you probably guessed, this method is not suitable for everyone. If you previously created backup copies of the registry through “File” - “Export” - read on, if not - move on to the next method.

So, you have a backup copy. Press the combination Win + R, the “Run” window will open. In the “Open” field we write regedit and click “OK”.

The Registry Editor window should appear. In it, go to the “File” tab and select “Import” from the menu.

Explorer will open, find the previously created backup in it and click “Open”.

Wait while the files are copied.

Using System Restore

System recovery can be done using restore checkpoints. You could create them earlier, when the system was stable and you were satisfied with everything. Or they could be created automatically by the system: when making changes to the computer configuration, before installing drivers, etc.

Let's first consider how to restore the registry if the operating system boots. In Windows 7, go to Start - "Control Panel".

Here we are interested in the point "Recovery".

In the next window, click "Run System Restore".

Now you need to select a restore point. If there are several points, and you are in doubt, look at the date the point was created - did your computer work normally on these dates?! - choose her. Clicking "Search for affected programs", you can see which programs will be removed as a result of recovery. Click "Next".

We confirm the system rollback to the selected state by clicking “Finish”.

All data, including the registry, will correspond to the state that was at the time the selected recovery point was created.

If you have Windows 8 installed on your computer, read the article: Windows 8 restore point and system rollback. There you will be interested in the second part. The steps you will need to perform are the same as those described above.

If the OS does not start

Restore the registry if the computer does not turn on It's also possible. In the Windows 7 operating system, when booting the computer, press the F8 button at intervals of 1 second. A window will appear "More download options". In it, use the arrows to select the item "Troubleshooting your computer".

In the next window, select your language and click Next.

Select your account, it is better if it has administrator rights, then enter the password if you have one set when logging in, and click OK.

The following window should appear, select the item in it "System Restore".

A recovery window will open, click “Next” in it and repeat the steps described in the paragraph above.

If you have Windows 8 installed on your computer, you can press F8 or Shift+F8 when loading, but you are unlikely to see a window for additional download options. It is best to use a system repair disk or bootable USB flash drive. You can create them on any other computer with Windows 8 installed.

Follow the link and read the article on how to restore Windows 8. Everything is described there in detail. You should see the following window. Then follow the path: “Diagnostics” – "System Restore", and select the desired restore point.

Via command line

In Windows, the files that are responsible for the operation of the registry are stored in the following path: C: (your system drive letter)/Windows/System32/config. There is also a folder RegBack, it stores backup copies of all registry branches. They are updated automatically by the system, depending on the settings, every 5-10 days.

We need to do the following: delete the files DEFAULT, SAM, SECURITY, SYSTEM, SOFTWARE, which are located in the config folder, and replace them with similar files from the RegBack folder.

We will not be able to do this in the operating system, since we will need to replace the files responsible for its operation. Therefore, you need to use additional boot options and open the command line.

In Windows 7, press F8 when the system boots. Then you need to do everything as described in the paragraph above. In the window "System Recovery Options", select item "Command line". As a result, the command line will launch as administrator.

In Windows 8, you can open the command line using the combination. This is described in detail in the article: Windows 8 Safe Mode. Read the point: enter safe mode using the Shift+reboot combination. When the following window appears, select "Command line".

If the computer does not turn on at all due to changes in the registry, then read the paragraph: enter safe mode using a system repair disk (you can create it on any computer with Windows 8 installed).

So, we launched the command line. Now enter the following commands line by line. At the end of each line, press Enter. First, let's create a badreg folder on the system drive and copy all the files of our non-working registry into it. Then we safely delete the files DEFAULT, SAM, SECURITY, SYSTEM, SOFTWARE from the config folder, because we have copies of them. And lastly, copy the backups from the regback folder to the config folder.

MD c:\badreg
copy c:\windows\system32\config\default c:\badreg
copy c:\windows\system32\config\sam c:\badreg
copy c:\windows\system32\config\system c:\badreg
copy c:\windows\system32\config\security c:\badreg
copy c:\windows\system32\config\software c:\badreg

delete c:\windows\system32\config\default
delete c:\windows\system32\config\sam
delete c:\windows\system32\config\system
delete c:\windows\system32\config\security
delete c:\windows\system32\config\software

copy c:\windows\system32\config\regback\default c:\windows\system32\config\
copy c:\windows\system32\config\regback\sam c:\windows\system32\config\
copy c:\windows\system32\config\regback\system c:\windows\system32\config\
copy c:\windows\system32\config\regback\security c:\windows\system32\config\
copy c:\windows\system32\config\regback\software c:\windows\system32\config\
exit

After you enter the exit command, the command prompt window will close and the computer will restart.

I hope one of the methods will help you restore the registry in the Windows 7 or 8 operating system.

Rate this article:

(3 ratings, average: 3,67 out of 5)

Webmaster. Higher education with a degree in Information Security. Author of most articles and computer literacy lessons

    Related Posts

    Discussion: 14 comments

  1. I enter the commands in the line as shown, for some reason it says: “the system was unable to find this path,” what should I do?

    Answer

    1. Most likely, your DEFAULT, SAM, SECURITY, SYSTEM, SOFTWARE folders are located in a different path, but not c:\windows\system32\config.

      Answer

The registry is a large database that stores all the parameters necessary for the normal operation of the operating system. You can view it through the registry editor, which is available in Windows. Any user can log in if their account has administrator rights.

And if you made any changes, or the computer turned off by itself, for various reasons, or you accidentally pressed the wrong key and deleted a parameter or an entire registry branch, then this may not have the best effect on the operation of the computer.

And yet, if this happens, let's figure out what ways there are to restore the Windows 7 and Windows 8 registry so that the computer can operate normally.

Using a backup

As you probably guessed, this method is not suitable for everyone. If you previously created backup copies of the registry through “File” - “Export” - read on, if not - move on to the next method.

So, you have a backup copy. Press the combination Win + R, the “Run” window will open. In the “Open” field we write regedit and click “OK”.

The Registry Editor window should appear. In it, go to the “File” tab and select “Import” from the menu.

Explorer will open, find the previously created backup in it and click “Open”.

Wait while the files are copied.

Using System Restore

System recovery can be done using restore checkpoints. You could create them earlier, when the system was stable and you were satisfied with everything. Or they could be created automatically by the system: when making changes to the computer configuration, before installing drivers, etc.

Let's first consider how to restore the registry if the operating system boots. In Windows 7, go to Start - "Control Panel".

Here we are interested in the point "Recovery".

In the next window, click "Run System Restore".

Now you need to select a restore point. If there are several points, and you are in doubt, look at the date the point was created - did your computer work normally on these dates?! - choose her. Clicking "Search for affected programs", you can see which programs will be removed as a result of recovery. Click "Next".

We confirm the system rollback to the selected state by clicking “Finish”.

All data, including the registry, will correspond to the state that was at the time the selected recovery point was created.

If you have Windows 8 installed on your computer, read the article: Windows 8 restore point and system rollback. There you will be interested in the second part. The steps you will need to perform are the same as those described above.

If the OS does not start

Restore the registry if the computer does not turn on It's also possible. In the Windows 7 operating system, when booting the computer, press the F8 button at intervals of 1 second. A window will appear "More download options". In it, use the arrows to select the item "Troubleshooting your computer".

In the next window, select your language and click Next.

Select your account, it is better if it has administrator rights, then enter the password if you have one set when logging in, and click OK.

The following window should appear, select the item in it "System Restore".

A recovery window will open, click “Next” in it and repeat the steps described in the paragraph above.

If you have Windows 8 installed on your computer, you can press F8 or Shift+F8 when loading, but you are unlikely to see a window for additional download options. It is best to use a system repair disk or bootable USB flash drive. You can create them on any other computer with Windows 8 installed.

Follow the link and read the article on how to restore Windows 8. Everything is described there in detail. You should see the following window. Then follow the path: “Diagnostics” – "System Restore", and select the desired restore point.

Via command line

In Windows, the files that are responsible for the operation of the registry are stored in the following path: C: (your system drive letter)/Windows/System32/config. There is also a folder RegBack, it stores backup copies of all registry branches. They are updated automatically by the system, depending on the settings, every 5-10 days.

We need to do the following: delete the files DEFAULT, SAM, SECURITY, SYSTEM, SOFTWARE, which are located in the config folder, and replace them with similar files from the RegBack folder.

We will not be able to do this in the operating system, since we will need to replace the files responsible for its operation. Therefore, you need to use additional boot options and open the command line.

In Windows 7, press F8 when the system boots. Then you need to do everything as described in the paragraph above. In the window "System Recovery Options", select item "Command line". As a result, the command line will launch as administrator.

In Windows 8, you can open the command line using the combination. This is described in detail in the article: Windows 8 Safe Mode. Read the point: enter safe mode using the Shift+reboot combination. When the following window appears, select "Command line".

If the computer does not turn on at all due to changes in the registry, then read the paragraph: enter safe mode using a system repair disk (you can create it on any computer with Windows 8 installed).

So, we launched the command line. Now enter the following commands line by line. At the end of each line, press Enter. First, let's create a badreg folder on the system drive and copy all the files of our non-working registry into it. Then we safely delete the files DEFAULT, SAM, SECURITY, SYSTEM, SOFTWARE from the config folder, because we have copies of them. And lastly, copy the backups from the regback folder to the config folder.

MD c:\badreg
copy c:\windows\system32\config\default c:\badreg
copy c:\windows\system32\config\sam c:\badreg
copy c:\windows\system32\config\system c:\badreg
copy c:\windows\system32\config\security c:\badreg
copy c:\windows\system32\config\software c:\badreg

delete c:\windows\system32\config\default
delete c:\windows\system32\config\sam
delete c:\windows\system32\config\system
delete c:\windows\system32\config\security
delete c:\windows\system32\config\software

copy c:\windows\system32\config\regback\default c:\windows\system32\config\
copy c:\windows\system32\config\regback\sam c:\windows\system32\config\
copy c:\windows\system32\config\regback\system c:\windows\system32\config\
copy c:\windows\system32\config\regback\security c:\windows\system32\config\
copy c:\windows\system32\config\regback\software c:\windows\system32\config\
exit

After you enter the exit command, the command prompt window will close and the computer will restart.

I hope one of the methods will help you restore the registry in the Windows 7 or 8 operating system.

Rate this article:

(3 ratings, average: 3,67 out of 5)

Webmaster. Higher education with a degree in Information Security. Author of most articles and computer literacy lessons

    Related Posts

    Discussion: 14 comments

  1. I enter the commands in the line as shown, for some reason it says: “the system was unable to find this path,” what should I do?

    Answer

    1. Most likely, your DEFAULT, SAM, SECURITY, SYSTEM, SOFTWARE folders are located in a different path, but not c:\windows\system32\config.

      Answer