Windows 2000 Registry Backup and Recovery

  

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

First, full backup /recovery registry

If you want to completely back up the registry, you can click "Export Registry" under the "Registry" menu in the registry editor Regedit.exe File "Command", and select the export scope as "All", save the registry file (*.reg) on ​​the hard disk. To restore the registry completely, just click the "Import Registry File" command under the "Registry" menu, and then select the corresponding backup registry file on the hard disk. By the way, the main reason that Regedit.exe (16-bit registry editor) is included in Windows 2000 is that its search function is relatively strong. Users can also use Regedit.exe to change the registry, but its function is not comprehensive enough (such as Setting permissions for registry keys) may not be able to view or edit individual data types correctly. Therefore, it is recommended to use Regedit.exe only for search and full backup of the registry. When you need to edit the registry, use Regedt32.exe in the system32 directory (it is a 32-bit registry editor that provides some advanced features. Multi-window format displays each predefined item, which is convenient to view).

Second, partial backup registry

If you only need to save a root key or a primary key (sub-key) and other general backup, it can be done more conveniently in Regedt32. First select the primary key or subkey to be saved, and then click the "Save Item" command under the "Registry" menu. In the "Save Item" dialog box that pops up, enter the file name of the registry file to be saved. Use "reg" for future searching.

When saving some primary keys or subkeys, because the user they are using is different, or the primary key or subkey is being used by the system, there is a warning that access is prohibited: "There are not enough permissions to save the item" . At this time, the system administrator can use the “Permissions” command under the “Security” menu to give the users of these primary keys or sub-keys “Full Control” permission (for details, see the 15th issue of “Computer Newspaper” Software World “Windows 2000”. The registry through (on) "text", and then you can save the item.

Save the registry primary key or subkey as an "item" file, can't it be straight? The text editor opens the view, so if you want to study the structure of the registry, you can export the registry file as a text file by selecting the "Save Subdirectory Tree As" command under the "Registry" menu and name it After the file with the extension TXT, click the "Save" button. In the future, we can use Windows WordPad or Notepad to view this text file. If you want, you can also use the Print Subtree command under the same menu to print.

Third, partial recovery /import registry

Partial recovery /import registry has two methods, the first is to restore the "items", that is, use the previously backed up registry files or other A registry file to overwrite an existing primary key. First in the Regedt32 registry editor, move the cursor to the primary key to be restored, then select the "Restore" command under the "Registry" menu, and select the registry file to be restored in the "Restore Item" window, single After clicking the "Open" button to confirm overwriting the existing primary key, you can restore the item to the currently selected item. Note: The file selected for restore must match the content of the primary key selected in the Registry Editor, that is, the previously saved registry "items" can only be restored to the original location.

Another way is to load a hive. Load Hive and Unload Hive. These two commands are only valid in the two predefined items window [HKEY_USERS] or [HKEY_LOCAL_MACHINE]. After the hive is loaded into the registry, the hive becomes a child of one of the items. To do this, in the Regedt32 Registry Editor, first select one of the two predefined items with the mouse, then select the Load Hive command under the Registry menu, and then in the Load Hive dialog box. Select the registry file to be loaded. Click the "Open" button and 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, and you will see a new primary key (.ChenNai) appearing below 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 "Registry" menu.

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

Finally, the location of the registry file in Windows 2000, like Windows 9X, Windows 2000 registry is also divided into two parts, but including multiple files, where the user configuration file is saved in the root directory The directory for the username under "Documents and Settings" includes two hidden files: NTUSER.DAT, NTUSER.INI, and ntuser.dat.LOG. The system configuration file is located in the "SYSTEM32CONFIG" under the Windows 2000 system directory, including DEFAULT, SOFTWARE, SYSTEM, AppEvent.Evt, SecEvent.Evt, SysEvent.Evt and other hidden files and their corresponding .LOG (log) files. SAV file. These registry files cannot be opened with other tools while Windows 2000 is running, unlike system.dat and user.dat under Windows 9X.

Copyright © Windows knowledge All Rights Reserved