SoFunction
Updated on 2025-04-06

Backup and restore of 9x and 2k registry

Since Windows 95, Microsoft has stored the configuration information of the Windows system in a database called the Registry. It is the core of Widnows system management of all software and hardware, which contains the configuration files of each computer user and important information about system hardware, installed programs, and property settings. Therefore, registry errors often cause system crashes, so it is particularly important to keep the registry "healthy". So, how to ensure the "health" of the registry? Old method - backup and recovery.

A. Backup and Restore of Windows 9x Registry

(1) Backup/restore registry using Scanreg

During the startup process, the system will automatically scan the registry, and the registry will be packaged and compressed into rb00?.cab, and stored in the directory C:\Windows\sysbckup. If there is any error, it will be automatically fixed. You can also check the registry when the system is running. For DOS version and Windows version, the corresponding version will be automatically started as soon as you enter "Scanreg". Click Start → Run, enter "Scanrge" in the "Open" dialog box, and then click OK. The program will scan the registry and display the scan results. If there is an error in the registry, you will be prompted to perform automatic repairs. If there is no backup of the registry, it will be automatically repaired. If it is normal and has not been backed up today, the program will prompt you to make a backup.

When there is an error in the registry, it cannot be repaired automatically and cannot enter Windows, you can run Scanreg/Fix under DOS for repair. This way, it is possible to rule out the possibility that the registry repair fails due to initializers, loading incorrect modules or applications and virus intrusion when the system starts automatically.

After using Scanreg for backup of the system registry, you need to restore the pure DOS environment in real mode. Type Scanreg/restore at the DOS prompt. Scanreg will first detect the registry, and then display several files to provide selections to determine what you think is normal for recovery. The DOS version has 3 functions, and its parameters are as follows:

BACKUP - Backup Registration

RESTORE - Recover the Registration

FIX - Repair the Registration

(2) Use Regedit to backup/restore the registry

In addition to being used for configuration modification, the registry editor also has a very important function, which is to backup and restore the registry.

Registry backup

Run "regedit" to open the "Registration Editor" window.

Open the "Register" → "Export Registration File" menu command, and the "Export Registration File" dialog box pops up. Select the path, name, and save all or only save a branch of the registry backup file. After setting it according to your needs, click the "Save" button to complete the backup of the registry.

Registry recovery

After opening the "Register Editor", run "Register" → "Introduce Registry File" and the "Introduce Registry File" dialog box pops up.

Find the registry backup file that you have exported, click the "Open" button to complete the recovery of the registry. After the recovery is completed, a prompt box appears, click the "OK" button and restart the computer.

(3) Recover using the Registry Editor

If you back up the registry before the registry error occurs, you can also use regedit to restore it in the DOS environment. The steps are as follows:

Start the computer with the boot disk, enter the Windows directory, type "regedit/C *.reg" in that directory, where *.reg is the backup registry file name, and then restart the computer to make the new registry take effect.

Note: This method is very slow, so everyone must be patient. If it is aborted in the middle, it may destroy the current registered file and cause the computer to fail to start.

B、Recovery of Windows 2000 registry

The Windows 2000 registry is also divided into two parts, but includes multiple files. Among them, the user configuration file is saved in the user name directory under the root directory "Documents and Settings", including two hidden files and log files. The system configuration file is located in "system32\config" in the Windows 2000 system directory, including multiple hidden files such as Default, Software, System,,,, and, and their corresponding log files and .sav files. These registry files cannot be opened with other tools when Windows 2000 is running, which is different from Windows 9x.

If you want to fully back up the registry in Windows 2000, you can enter "regedit" in the "Run" box to open the registry editor, open the "Register" → "Export registry file" command, select the export range as all, and then give the path and name of the backed up registry file. The method to restore the registry is the same as above. Just click "Import Registry File" under the "Registration" menu, and then select the corresponding registry backup file on the disk.

If you only need to save a root key or a primary key, you can use WINNT\system32\. First, select the primary or subkey to save, and then click the "Save Item" command under the "Registration" menu. Enter the file name of the registry file to be saved in the "Save Item" dialog box that pops up. It is recommended to use "reg" to facilitate future management.

Because Windows 2000 is a true multi-user operating system, when saving certain primary keys or subkeys, because the user performing the operation is different, or the primary key or subkey is being used by the system, a warning of prohibited access will appear, such as "Insufficient permissions, Unable to save items" and other message prompts. This is if you are an Administrator identity, you can use the Permissions command under the Security menu to give "full control" permissions to users of these primary or subkeys, and then you can save the item.