Share via


Reg export

 

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

Copies the specified subkeys, entries, and values of the local computer into a file for transfer to other servers.

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

Syntax

Reg export KeyName FileName [/y]

Parameters

Parameter

Description

<KeyName>

Specifies the full path of the subkey. The export operation works only with the local computer. The KeyName must include a valid root key. Valid root keys are: HKLM, HKCU, HKCR, HKU, and HKCC.

<FileName>

Specifies the name and path of the file to be created during the operation. The file must have a .reg extension.

/y

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

/?

Displays help for reg export at the command prompt.

Remarks

The following table lists the return values for the reg export operation.

Value

Description

0

Success

1

Failure

Examples

To export the contents of all subkeys and values of the key MyApp to the file AppBkUp.reg, type:

reg export HKLM\Software\MyCo\MyApp AppBkUp.reg

Additional references

Command-Line Syntax Key