Reg save

Applies To: Windows 7, Windows Server 2000, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Vista, Windows XP

Saves a copy of specified subkeys, entries, and values of the registry in a specified file.

For examples of how to use this command, see Examples.


reg save <KeyName> <FileName> [/y]


Parameter Description


Specifies the full path of the subkey. For specifying remote computers, include the computer name (in the format \\ComputerName\) as part of the KeyName. Omitting \\ComputerName\ causes the operation to default to the local computer. The KeyName must include a valid root key. Valid root keys for the local computer are: HKLM, HKCU, HKCR, HKU, and HKCC. If a remote computer is specified, valid root keys are: HKLM and HKU.


Specifies the name and path of the file that is created. If no path is specified, the current path is used.


Overwrites an existing file with the name FileName without prompting for confirmation.


Displays help for reg save at the command prompt.

Remarks &lt;optional section&gt;

  • The following table lists the return values for the reg save operation.
Value Description





  • Before editing any registry entries, save the parent subkey with the reg save operation. If the edit fails, restore the original subkey with the reg restore operation.


To save the hive MyApp into the current folder as a file named, type:

REG SAVE HKLM\Software\MyCo\MyApp

Additional references

Command-Line Syntax Key