SoFunction
Updated on 2025-04-09

Detailed explanation of Win2k registry backup and recovery

Windows 2000 stores its configuration information in a database called Registry, which contains the configuration files of each computer user, as well as information about system hardware, installed programs, and property settings. Windows 2000 always references this information during its operation. The registry is stored in binary on the hard disk, and incorrectly editing the registry can seriously damage the system. Therefore, it is highly recommended to back up the registry information before changing it. In order to prevent fatal errors when modifying the registry, it is necessary to understand the backup and recovery methods of registry files. In addition, in order to study the structure of the registry, you can also save a primary or subkey in the registry as a text file or print it out. This work also requires understanding the import and export methods of the registry file.

 A. Complete backup/restore registry

If you want to fully back up the registry, you can click the "Export Registry File" command under the "Registration" menu in the registry editor, and select the export range to "All", and save the registry file (*.reg) on ​​the hard disk. The method to completely restore the registry is the same as above. Just click the "Import Registry File" command under the "Registration" menu, and then select the corresponding backup registry file on the hard disk. By the way, the main reason why (16-bit registry editor) is included in Windows 2000 is that its search function is relatively strong, and users can also use to change the registry, but its functions are not comprehensive enough (such as the permissions of registry keys cannot be set), and individual data types may not be viewed or edited correctly. Therefore, it is recommended to only use a complete backup of the search and registry. When you need to edit the registry, use the system32 directory (it is a 32-bit registry editor, which provides some advanced functions and displays predefined items in a multi-window format, which is more convenient to view).

B. Partial backup registry

If you only need to save general backups such as a root key or a primary key (subkey), it can be done more easily in Regedt32. 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 search.

When saving certain primary keys or subkeys, because they use different users, or because the primary key or subkey is being used by the system, a warning that prohibits access will appear: "The permissions are insufficient, and the item cannot be saved". At this time, the system administrator can use the "Permissions" command under the "Security" menu to give users of these primary or subkeys "full control" permissions (see the article "Windows 2000 Registration Express (Part 1)" in the Software World of Computer Newspaper for details (see the article "Windows 2000 Registration Express (Part 1)" in the 15th issue of "Computer News" software world), and then you can save this item.

Save the primary key or subkey of the registry as a "item" file, and cannot be directly? The text editor opens to view it, so if you want to study the structure of the registry, you can export the registry file as a text file. The method is to select the "Save Subdirectory Tree as" command under the "Registration" menu, name it a file with the extension TXT, and then click the "Save" button. In the future, we can use Windows' WordPad or Notepad to view this text file. If necessary, you can also use the Print Subdirectory Tree command under the same menu to print.

C. Partial recovery/import registry

There are two ways to partially restore/import the registry. The first is to restore the "key", that is, to overwrite the existing primary key using previously backed up registry files or other registry files. First, in the Regedt32 registry editor, move the cursor to the primary key to restore, then select the "Restore" command under the "Register" menu, and select the registry file to restore in the "Restore Items" window. Click the "Open" button to confirm that the existing primary key is overwritten, you can restore the item to the currently selected item. Note: The file selected to restore must match the primary key content selected in the registry editor, that is, the original saved registry "key" can only be restored to the original location.

Another way is to load the hive. Load hive and Uninstall hive. These two commands are only valid in the two predefined item windows [HKEY_USERS] or [HKEY_LOCAL_MACHINE]. After loading the hive into the registry, the hive becomes a child of one of the items. The specific method is to use the mouse to select one of the two predefined items above in the Regedt32 registry editor, first use the mouse to select the "Load hive" command under the "Registration" menu, then select the registry file to be loaded in the "Load hive" dialog box. After clicking the "Open" button, the "Load hive" dialog box appears. Enter the name of the new primary key in the "Item Name" text box of the dialog box, such as ".ChenNai", and then click the "OK" button. In this way, you will find that a new primary key (.ChenNai) appears under the current primary key. If you want to uninstall the hive, it is also very simple. After selecting the primary key, select the "Uninstall hive" command under the "Registration" menu.

The difference between the above two methods is that the primary key introduced by "Loading Hive" can be content that was not originally found in the registry.

Finally, the location of the registry file in Windows 2000. Like Windows 9X, the registry of Windows 2000 is also divided into two parts, but includes multiple files. 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 (log) files and .SAV files. These registry files cannot be opened using other tools when Windows 2000 is running, which is different from those under Windows 9X.