Registry Backup Using Resource Kit Utilities

Windows NT/2000/XP Resource Kit software products can simplify the process of administering and supporting Windows NT/2000/XP. Normally, any software product of this type includes a distribution CD and several volumes of supplementary documentation. Despite the fact that Microsoft doesn't officially support Resource Kit products and doesn't provide any warranties, Resource Kit utilities are valuable tools for the experienced system administrator. Furthermore, Microsoft warns customers that they should use these tools at their own risk. Resource Kit utilities aren't subject to localization; they were only tested with the U.S versions of Windows NT/2000/XP, and their usage with localized versions may lead to unpredictable results.

In spite of all the facts mentioned above, Resource Kit software is very popular among system administrators, support specialists, and programmers. Most Resource Kit utilities were developed for internal use, and they significantly extend existing Windows NT/2000/XP functionality. It's not surprising, then, that Resource Kits also contain registry tools.

Caution 

Resource Kit utilities intended for working with the system registry are command-line tools. Use these tools with caution. Note that registry editors, which at least have a graphical user interface, are much easier to use. When using the Resource Kit command-line utilities for modifying the registry, you need to have a proper understanding of the changes you're going to introduce into the local or remote registry.

The REG Utility from Windows 2000 Resource Kit

The REG utility included with the Windows 2000 Resource Kit allows you to add, modify, delete, and search registry keys and values, perform registry backup and restore, as well as other administrative operations. This command-line utility can also be used in the batch files. It can operate over both local and remote registries.

The REG utility implements the functionality of the following registry tools from the previous Resource Kit versions: Regchg.exe, Regdel.exe, Regdir.exe, Regread.exe, Regsec.exe, Restkey.exe, Rregchg.exe, and Savekey.exe. In Windows 2000, it replaces all of these utilities.

Reg.exe supports the following commands:

  • REG QUERY
    Returns information on the keys and values contained within the specified registry key or hive.

  • REG ADD
    Adds a new value into the specified key.

  • REG UPDATE
    Modifies the current state of the registry element. If the registry doesn't contain a specified value, the command is ignored.

  • REG DELETE
    Deletes a registry value, key, or several keys.

  • REG COPY
    Copies a registry element into a new registry key on the local or remote computer.

  • REG SAVE and REG BACKUP
    Saves the indicated registry values, keys, or hives to the specified file. This command is particularly useful for backing up the registry before introducing any changes. The REG SAVE and REG BACKUP commands are identical.

  • REG RESTORE
    Restores the specified value, key, or hive from the file created using the REG SAVE or REG BACKUP commands.

  • REG LOAD
    Temporarily loads the specified key or hive from the file created using REG BACKUP or REG SAVE into the root level of the registry. This command is useful for viewing information, editing registry data, or performing troubleshooting operations.

  • REG UNLOAD
    Unloads the specified key or hive previously loaded using REG LOAD.

The REG SAVE and REG BACKUP commands support the following syntax:

     REG SAVE RegistryPath FileName [\\Machine]     REG BACKUP RegistryPath FileName [\\Machine] 

The RegistryPath argument specifies the registry path to the registry key or value in the following format: [ROOTKEY\]Key.

The ROOTKEY parameter specifies the registry root key containing the key to be backed up (the default value of this parameter is HKEY_LOCAL_MACHINE).

The root key may be specified using one of the following abbreviations listed below:

     HKEY_LOCAL_MACHINE-HKLM     HKEY_CURRENT_USER-HKCU     HKEY_CLASSES_ROOT-HKCR     HKEY_CURRENT_CONFIGURATION-HKCC 

Key—this parameter specifies the complete path to the registry key contained within the root key specified by the ROOTKEY parameter.

FileName—this parameter specifies the file name (without an extension), where the registry data will be saved. (On a local computer, this file will be stored in the current directory. When working with remote systems, this file will be saved in the Windows installation directory.)

Machine—this parameter specifies the name of the remote computer (by default, the local system is used). Use a UNC notation when specifying computer names. For example: \\STATION1.

Note 

Only HKLM and HKU keys are available when working with remote systems.

The REG RESTORE command supports the following syntax:

     REG RESTORE FileName KeyName [\\Machine] 

where:

FileName—the name of the file to be restored (without the filename extension). This parameter should specify a file previously created using REG SAVE or REG BACKUP.

KeyName—name of the registry key, in the following format: [ROOTKEY\] Key.

  • Key—complete path to the registry key contained within the root key specified by the ROOTKEY parameter.

Machine—name of the remote system in UNC format (by default, the local computer will be used).



Windows XP Registry
Linux Enterprise Cluster: Build a Highly Available Cluster with Commodity Hardware and Free Software
ISBN: N/A
EAN: 2147483647
Year: 2000
Pages: 144
Authors: Karl Kopper

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net