![]() |
![]() |
The restore registry command restores the Windows registry.
For information on system objects that must be restored together, see "Backing Up System Objects".
When you restore a registry key, you have a choice of whether or not to activate the key. A backup copy of the active registry and registry key is made in the adsm.sys\registry.sav file on the system drive root directory before the registry is restored. If Windows does not boot with the newly restored registry, you can used this saved copy to reboot. If you are using Windows Me, the file will be adsm98.sys\registry.sav. The directory structure is the same as c:\adsm.sys\registry, which is described below.
If you cannot boot Windows, you might be able to manually restore the registry if you can boot another operating system that does not use the registry. During backup and restore, copies of the registry are saved on the workstation in the following directories (assuming that your system drive is c:):
Note: For Windows Me, the directory name is adsm98.sys\registry.
Attention: Restore the registry to the same workstation from which it was backed up, since the registry contains specific hardware and software information. If you try to restore to another workstation, you may not be able to boot the computer after the restore.
If you have the NT Server Resource Kit installed, you can use the regrest standalone utility to restore the registry file created with the backup registry command. For example, assume that a user profile is backed up to a file named guest and you want to save the active copy of the registry to a file named guest.sav. The hive type you want to save to is users, and the hive name is the user SID, which is found in hk_users. You would enter the following statement:
restore registry c:\adsm.sys\registry\machine\users\guest c:\guest.sav users S-1-5-21-8533442-1654749355-78804774-1152For Windows 2000, XP, and Windows.NET, registry backup you can simply enter:
RESTORE REGISTRY -ACTIVATE=NO
Once you have entered that command, you can then go into the c:\adsm.sys\W2KReg directory to find the individual registry keys you want to restore. For the restore to take effect, you must reboot your machine.
For complete information on the regrest tool, see the documentation for your NT Server Resource Kit.
Supported Clients
This command is valid for all Windows clients.
Syntax
For Windows 2000, XP, Windows.NET
.-Yes-. >>-REStore REgistry-- ACTIVATEkey-+-----+--+----------+-------->< '-No--' '- options-'
For Windows NT
.-ENTIRE-. >>-REStore REgistry--+- -+--------+-----------+-----------------> +- MACHINE-+- SAM------+-+ | +- SECURITY-+ | | +- SOFTWARE-+ | | '- SYSTEM---' | '- USER-+- CURUSER-+-----' '- DEFAULT-' .-Yes-. >-- ACTIVATEkey-+-----+---------------------------------------->< '-No--'
For Windows Me
.-ENTIRE-. >>-REStore REgistry--+- -+--------+-----------+-----------------> +- MACHINE-+- CONFIG---+-+ | +- ENUM-----+ | | +- HARDWARE-+ | | +- NETWORK--+ | | +- SAM------+ | | +- SECURITY-+ | | +- SOFTWARE-+ | | '- SYSTEM---' | '- USER-+----------+-----' '- DEFAULT-' .-Yes-. >-- ACTIVATEkey-+-----+---------------------------------------->< '-No--'
Parameters
The following parameters are for Windows Me and Windows NT.
Examples
Command: rest reg entire
Command: rest reg machine sam
Command: rest reg machine same -activate=y