Reg command compare in Windows
The command reg compare helps to compare the specified subkey or entry.To learn more about how to use this command, see the example section below.
Syntax reg compare command
reg compare [{/ v ValueName | / ve}] [{/ oa | / od | / os | on}] [/ s]
Reg command parameter compare
Parameters
Describe
Specify the full path of the first subkey to be compared.To specify a remote computer, attach the computer name (in the format) as part of the KeyName parameter.In addition, parameter KeyName1 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 full path of the second subkey to be compared.To specify a remote computer, attach the computer name (in the format) as part of the KeyName parameter.If only specify each computer name in theKeyName2parameter, the path to thesubkeyspecified in KeyName1 will be used.In addition, the parameter KeyName2 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.
/ v
Specify a value name to compare subkeys.
/ ve
Specifies that only entries with the name of the name must be compared.
[{/ oa
/ od
/ oa
Specifies that all differences and matches (match) will be displayed.By default, only the differences are listed.
/ od
Specify that only the differences are listed.This is the default value.
/ os
Specifies that only matching results will be displayed.By default, only new differences are listed.
/ on
Specifies that no results are allowed to be displayed.By default, differences will be listed.
/S
Compare all subkeys and entries recursively.
/?
Show help at thecommand prompt.
Reg command statement compare
The following table lists the return values for the reg compare command
Parameters
Describe
0
The comparison process is complete and the results are the same.
first
The comparison process failed.
2
Compare successes and differences have been found.
The following table lists the icons displayed in the returned results:
Symbol
Meaning
=
Data of KeyName1 is equal to the data of KeyName2.
<
Data of KeyName1 is smaller than the data of KeyName2.
>
Data of KeyName1 is larger than data of KeyName2.
For example reg compare command
To compare all the values in the key named MyApp with all the values in the key named SaveMyApp, enter:
REG COMPARE HKLMSoftwareMyCoMyApp HKLMSoftwareMyCoSaveMyApp
To compare the Version values in the key named MyCo and the Version values in the key named MyCo1, type:
REG COMPARE HKLMSoftwareMyCo HKLMSoftwareMyCo1 / v Version
To compare all subkeys and values in HKLMSoftwareMyCo on a computer named ZODIAC, with all subkeys and values in HKLMSoftwareMyCo on the local computer, enter:
REG COMPARE ZODIACHKLMSoftwareMyCo. /S
See more:
- The qprocess command in Windows
- Qappsrv (query termserver) command in Windows
- The quser (query user) command in Windows
- The pubprn command and the pushprinterconnections command in Windows
You should read it
- How are Command Prompt (cmd) and PowerShell different?
- Diskcomp command in Windows
- Del command in Windows
- Set command in Windows
- Cmd command in Windows
- Command at in Windows
- The LIKE command in SQL
- Fc command in Windows
- The echo command in Windows
- Bitsadmin getdisplayname and bitsadmin geterror command in Windows
- Reg command copy in Windows
- The command reg add in Windows