Bookmark This Page  

ALERTS (Security)

ALERTS (Virus)

Updated 10/28/11

Will Hawkins

 
 


How to make a backup of the Windows registry


Before you begin: PCTNT provides the following information as a convenience. This information is not intended to replace information from Microsoft.

For maximum safety, PCTNT recommends that any time that you edit the registry, you back up the entire registry. This is fairly easy in Windows 98 and Me. However, because Windows NT/2000/XP encrypts some registry keys and Windows 95 does not have a utility for easy registry backups, backing up the entire registry is more difficult under these operating systems.

As an alternative to backing up the entire registry, you can back up a specific key before modifying it. There is, however, some risk in doing this. You must know exactly which key or keys to back up. And, on Windows NT/2000/XP, you must be certain that none of the keys contain encrypted values.

If you back up only the key that a article or technician recommends that you modify or delete, make sure to select the correct key. If you choose single-key backup (described immediately following) and if you are not comfortable editing the registry, obtain the services of a qualified computer consultant.



Click an icon to either expand ( Show details for How to back up a single registry key) or collapse ( ) each section.



    Show details for How to back up a single registry keyHow to back up a single registry key


    WARNING: Do not use this method to export the entire registry or an entire registry "hive" (the highest level "folders"--see the following graphic). To back up the entire registry, see the section of this document titled "How to back up the entire registry."



    To back up a registry key:
    1. Click Start, and then click Run. The Run dialog box appears.
    2. Type:

    regedit

    and then click OK.

    The Registry Editor opens.
    3. Select the key that you were instructed to modify. Registry keys are displayed in the left pane and the registry key icon is a yellow folder. You must always back up the parent key (not the value that is displayed in the right pane) for any value that you are modifying or deleting.

    For example:

    You are removing a Trojan horse and must delete a particular value from the registry key:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run


    In this case, browse all the way down to the \Run key and select it as shown here:



    4. Do one of the following:

    • Windows 95/98/Me. Click Registry, and then click Export Registry File.
    • Windows XP. Click File and then click Export.
       

    5. Follow the instructions for your operating system (the dialog box that you see may vary slightly from what is shown here):
     

    • Windows 95/98
      1. Select "Desktop" in the "Save in" box of the dialog box.
      2. In the File name box, enter a name that you will remember, such as registrybackup.
      3. Click Save. The file is saved to your Windows desktop.


         
    • Windows Me/XP
      1. Click the Desktop icon.
      2. In the File name box, enter a name that you will remember, such as registrybackup.
      3. Click Save. The file is saved to your Windows desktop.


         

    6. Continue editing the registry as instructed.

     


    WARNING: Do not double-click the backup file that was placed on the Windows desktop except to undo the changes that you made to the registry. We suggest that you keep the backup file for a week or so until you are sure that the changes that you made have not caused any problems.



    Show details for How to use the backup file to undo changes to the registryHow to use the backup file to undo changes to the registry

  • This will undo all deletions or changes that you made within the part of the registry that is within the backup file.
  • It will not remove additions that you made--for example, you created a new key or value.
  • If you installed new software or made other changes to the computer since you created the backup file, it is possible that merging the backup file to the registry could affect some of these changes.

    To restore the registry backup:
    1. Locate the registry backup file that you created. It will have an icon similar to this:



    2. Double-click the icon. A message similar to the following is displayed:



    3. Click Yes. A confirmation is displayed.




    4. Click OK.


    Windows NT/2000
    In addition to the most recent version of the Registry Editor, Regedit.exe, (whose use is described in the previous section), Windows NT, 2000, and XP also have the older version of the Registry Editor, Regedt32.exe. This older version uses a different interface and the instructions for backing up and restoring keys are different.

    As of this writing, if you are using Windows NT or 2000, Microsoft recommends that you use this older version of the Registry Editor (Regedt32.exe) to back up (save) the registry keys. (If you are using Windows XP, using the newer version, Regedit.exe, is recommended.)

    Because using the older Registry Editor is somewhat more complex than the newer version and you are using Windows NT or 2000, please refer to the instructions in the section "How to Export Registry Keys" in one of the following documents:
  • HOW TO: Backup, Edit, and Restore the Registry in Windows NT 4.0 (Q323170).
  • HOW TO: Backup, Edit, and Restore the Registry in Windows 2000 (Q322755).


    Show details for How to back up the entire registryHow to back up the entire registry
  • How to Back Up the Registry in Microsoft Windows 95
  • How to Back Up the Registry in Windows 98 and Windows Millennium Edition

    Windows NT/2000/XP
    Read the section "How to Back Up the Whole Registry" in the Microsoft Knowledge Base article that applies to your operating system:
  • HOW TO: Backup, Edit, and Restore the Registry in Windows NT 4.0 (Q323170).
  • HOW TO: Backup, Edit, and Restore the Registry in Windows 2000 (Q322755).
  • HOW TO: Back Up, Edit, and Restore the Registry in Windows XP (Q322756).

    For additional information about the Windows registry and the use of the Registry Editor, read the following documents:
  • How to use the Windows Registry editor.
  • Description of the Microsoft Windows Registry (Q256986).
     
print this document