Use command-line options to edit registries with regedit exe


How to edit a registry using the command line


Download 55.47 Kb.
bet4/6
Sana05.05.2023
Hajmi55.47 Kb.
#1430196
1   2   3   4   5   6
Bog'liq
Use command (registry)

How to edit a registry using the command line
While regedit can be used on the command line, it is not optimal for granular administrative work. To make repeatable changes to the registry in multiple machines with automation, it's worth looking into switching from regedit to reg, a command-line-based tool included with Windows.
The reg utility offers more expansive functionality to edit subkeys and their values from the command line. Reg is more flexible and works well for a range of administrative scenarios, such as using batch files to correct common issues in client machines and managing the registry on a remote machine.
The reg command has 11 parameters, each with its own set of flags that provide additional functionality. The screenshot shows the help menu for the reg add parameter, which includes its flags and examples of how to use the parameter.
To use reg, type cmd from the Windows run or search box to open the command prompt.
To show all the parameters for the reg command, enter reg /? from the command prompt. Typing reg
/? 
shows the switches available for the parameter and examples of how to use them.

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: 

Download 55.47 Kb.

Do'stlaringiz bilan baham:
1   2   3   4   5   6




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling