The reg command restores and reg saves in Windows
The reg command restores and reg save.
Reg restore command
The reg restore command helps to save saved subkeys and entries back to the registry.For a better understanding of how to use this command, see the example section below.
Syntax command reg restore
Reg restore
Parameter reg command restore
Parameters
Describe
Specifying the full path of the subkey will be restored.The reg restore command only works with the local computer.The KeyName parameter must include a valid root key.Valid root keys will be: HKLM, HKCU, HKCR, HKU and HKCC.
Specifies the name and path of the file whose content is written to the registry.This file must be created in advance by executing the reg save command and using the .hiv extension.
/?
Show help at thecommand prompt.
Reg restore command
Before editing any registry entries, save the original subkeys with the reg save command. If the editing process fails, restore the original subkey with the reg restore command.
The following table lists the return values for the reg restore command:
Value
Meaning
0
Success
first
Failure
Reg restore command example
To restore a file named NTRKBkUp.hiv to HKLMSoftwareMicrosoftResKit key and overwrite the existing content of that key, enter:
REG RESTORE HKLMSoftwareMicrosoftResKit NTRKBkUp.hiv
Reg save command
The reg save command saves a copy of the subkey, the entry and value of the registry specified in a specified file.For a better understanding of how to use this command, see the example section below.
Syntax reg save command
reg save [/ y]
Parameter reg save command
Parameters
Describe
Specify the full path of the subkey.To specify a remote computer, attach the computer name (in the format) as part of the KeyName parameter.In addition, the KeyName parameter must also include a valid root key.Valid root keys for local computers are: HKLM, HKCU, HKCR, HKU and HKCC.If the remote computer is specified, valid root keys will be HKLM and HKU.
Specify the name and path of the created file.If no path is specified, the current path will be used by default.
/ y
Specify to overwrite an existing file with the name FileName without prompting to confirm.
/?
Show help at thecommand prompt.
Note the save command reg
The following table lists the return values for the reg save command:
Value
Meaning
0
Success
first
Failure
Before editing any registry entries, save the original subkeys with the reg save command. If the editing process fails, restore the original subkey with the reg restore command.
For example the reg save command
To save the hive named MyApp to the current directory as a file called AppBkUp.hiv, enter:
REG SAVE HKLMSoftwareMyCoMyApp AppBkUp.hiv
See more:
- Summary of 20 common Run commands on Windows operating system
- Summary of shortcuts to know in Windows 10
- Basic Linux commands everyone needs to know
- Table summarizes the basic PowerShell commands
You should read it
- Del command in Windows
- How to use the command history function in Command Prompt
- Set command in Windows
- Cmd command in Windows
- Command at in Windows
- Fc command in Windows
- Bitsadmin getdisplayname and bitsadmin geterror command in Windows
- The echo command in Windows
- The command reg add in Windows
- Rem command in Windows
- Doskey command in Windows
- Reg command copy in Windows
Maybe you are interested
How to use Photoshop CS5 - Part 15: Remove wrinkles with the Healing Brush tool The list of foods that contain the most iron is easy to find Changing your sleeping position can help you improve your health There was a year when the Earth had no summer and the world history was changed 10 types of food enhance men's vitality Surgery can permanently change your eye color to blue