Parameter
|
Description
|
reg add
|
Inserts a new subkey or entry to the registry. The following example shows how to add a key to remote Windows system named RemotePC: reg add \\RemotePC \HKLM\Software\Test
|
reg compare
|
Runs a comparison of specified registry subkeys or entries. The following example compares all values under the named keys: reg compare HKLM\Software\Test\MyApp HKLM\Software\Test\SaveMyApp. If the results are identical, reg will return a 0 code. If the results are different, reg will return a code of 2. If the operation failed, reg will display a code of 1.
|
reg copy
|
Copies a registry entry to a specified location on the local or remote computer. Example of use: reg copy \\RemotePC\HKLM\Software\TestKey HKLM\Software\TestKey. The command will copy the TestKey values in the registry from the remote machine named RemotePC to the current machine.
|
reg delete
|
Removes a subkey or entries from the registry. Example of use: reg delete HKLM\Software\FakeName\TestApp\Settings. This command deletes the Settings registry key, and any subkeys and settings.
|
reg export
|
Exports named subkeys, entries and values of the local computer into a file. Example of use: reg export HKLM\Software\FakeName\TestApp BackupFile.reg. The command makes a copy of the TestApp key and its subkeys and values in a file name BackupFile.reg.
|
reg import
|
Copies the contents of a file that contains exported registry subkeys, entries and values into the registry of the local computer. Example of use: reg import BackupFile.reg. The command adds BackupFile.reg registry entries to the machine.
|
reg load
|
Writes saved subkeys and entries into a different subkey in the registry. Example of use: reg load HKLM\Test TestHive.hiv. This command will load the TestHive.hiv file into the HKLM\Test key.
|
reg query
|
Returns a list of the next tier of subkeys and entries that are located under a specified subkey in the registry. Example of use: reg query HKLM\Software > C:\regoutput.txt. This command outputs the subkeys of HKLM\Software into a file named regoutput.txt in the C:\ folder.
|
reg restore
|
Imports subkeys and entries from a file into the registry. Example of use: reg restore HKLM\Software\Microsoft\Test RegBackup.hiv. This command will restore the contents of the RegBackup.hiv file into the Test key.
|
reg save
|
Exports specified registry subkeys, entries and values into a named file. Examples of use: reg save HKLM\Software\Test\AppTest BackupFile.hiv. The command saves the AppTest hive to the BackupFile.hiv file.
|
reg unload
|
Removes the registry section loaded by the reg load operation. Example of use: reg unload HKLM\TestHive. The command unloads HKLM\TestHive from the registry.
|