If you wish to export the entire Registry, select the active main node of the tree. Note that only the rootkeys HKEY_LOCAL_MACHINE and HKEY_USERS get exported because all other rootkeys are included (they can be found as subkeys of any of these two rootkeys).
Warnings about Registration (REG) filesYou can use RegEdit-compatible registration files to create distributable registry scripts but not to backup or to store data. Because of bugs in all existing regedit.exe versions, certain registry values exported into a registration file may remain ignored when reimported. This problem exists with both ANSI and UNICODE REG files.
It is also possible that certain registry keys do not get exported because the user who is currently logged on may have insufficient permissions to read them. Typically, a reg file does not contain any information on security, permissions and ownership when running on Windows XP/2000/NT.
CAUTION: You have to know that if you ever accidentally double-click on a *.reg file, its content will merge into your Registry. To prevent this, open Windows Explorer (My Computer) select View/ Options menu (for Windows XP/2000 - Tools/Folder Options). On the File Types tab scroll to Registration Entries and select it. Click the Edit button. In the Actions list, select Edit and press the Set Default button.
These actions change the default behavior so that double-clicking a *.REG file will open it in notepad. If you want to merge it with the Registry, click mouse-right-button and select Merge from the menu.
Windows 95,98: 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] /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.
/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.