Saving and Restoring the Registry

The Registry can be exported, imported, or recreated using either the Windows-based version of Registry Editor or the real-mode version on the Windows 95 emergency startup disk. By using the export capabilities of Registry Editor, a specific branch or the entire Registry can be saved in text format as a .REG file. A branch of or the entire Registry can be restored by importing a .REG file that was created by exporting the Registry.

If you are exporting or importing Registry files using the Windows-based version of Registry Editor, use the Export and Import commands from the Registry menu. The information in online Help can guide you through this process.

In rare circumstances when the Registry is badly corrupted, you can start the computer using the Windows 95 startup disk. Then you can use the real-mode REGEDIT.EXE utility on the startup disk to import a .REG file. In this case, the following command syntax can be used at the command prompt.

regedit [/L:system] [/R:user] file1.reg, file1a.reg...
regedit [/L:system] [/R:user] /e file3.reg [regkey]
regedit [/L:system] [/R:user] /c file2.reg

Parameter

Description

/L:system

Specifies the location of SYSTEM.DAT.

/R:user

Specifies the location of USER.DAT.

file1.reg

Specifies one or more .REG files to import into the Registry.

/e file3.reg

Specifies the filename to which the Registry should be exported.

regkey

Optionally, specifies the starting Registry key from which to export a portion of the Registry. If no value is specified, regedit /e exports the entire Registry.

/c file2.reg

Specifies the .REG file to use to replace the entire contents of the Registry.


Caution

Use the regedit /c option with extreme care, and only when you are sure that the specified .REG file contains a complete image of the Registry.

Also, the Windows 95 Resource Kit does not provide sufficient information to guide you through the process of editing an .REG file, so it is recommended that you undertake editing an .REG file only under the guidance of your product support representative.