The REG COMPARE command.

Jerold Schulman

October 17, 2006

1 Min Read
ITPro Today logo in a gray background | ITPro Today

REG.EXE, built into Windows XP, Windows Server 2003, and later operating systems, or installed from the Windows 2000 Support Tools, has a COMPARE command.

When you type: REG COMPARE /?, you receive:

REG COMPARE KeyName1 KeyName2 [/v ValueName | /ve] [Output] [/s]  KeyName    [\Machine\]FullKey    Machine  Name of remote machine - omitting defaults to the current machine             Only HKLM and HKU are available on remote machines    FullKey  ROOTKEYSubKey             If FullKey2 is not specified, FullKey2 is the same as FullKey1    ROOTKEY  [ HKLM | HKCU | HKCR | HKU | HKCC ]    SubKey   The full name of a registry key under the selected ROOTKEY  ValueName  The value name, under the selected Key, to compare             When omitted, all values under the Key are compared  /ve        compare the value of empty value name   /s         Compare all subkeys and values  Output     [/oa | /od | /os | /on]             When omitted, output only differences    /oa      Output all of differences and matches    /od      Output only differences    /os      Output only matches    /on      No outputReturn Code:  0 - Succussful, the result compared is identical  1 - Failed  2 - Successful, the result compared is differentExamples:  REG COMPARE HKLMSoftwareMyCoMyApp HKLMSoftwareMyCoSaveMyApp    Compares all values under the key MyApp with SaveMyApp  REG COMPARE HKLMSoftwareMyCo HKLMSoftwareMyCo1 /v Version    Compares the value Version under the key MyCo and MyCo1  REG COMPARE \ZODIACHKLMSoftwareMyCo \. /s    Compares all subkeys and values under HKLMSoftwareMyCo on ZODIAC    with the same key on the current machine


Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like