Reg command compare in Windows

The command reg compare helps to compare the specified subkey or entry.

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:

  1. The qprocess command in Windows
  2. Qappsrv (query termserver) command in Windows
  3. The quser (query user) command in Windows
  4. The pubprn command and the pushprinterconnections command in Windows

 

4 ★ | 3 Vote