[HELP-Batch File] How to use reg compare exactly?

December 7, 2012 at 10:10:16
Specs: Windows XP
I will make a registry checker with batch file, and i have some problem to make it.
In this case i'll use REG COMPARE to compare the user reg file with the default reg, the problem is how do i call the registry file on the user to compare with default reg file?
Thanks before :)

See More: [HELP-Batch File] How to use reg compare exactly?

Report •

December 7, 2012 at 10:42:59
C:\>reg compare /?

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  ROOTKEY\SubKey
             If FullKey2 is not specified, FullKey2 is the same as FullKey1.
    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 (Default).

  /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 output.

Return Code:

  0 - Successful, the result compared is identical
  1 - Failed
  2 - Successful, the result compared is different

  The symbols at the front of each outputted line are defined as:
  = means FullKey1 data is equal to FullKey2 data
  < refers to FullKey1 data and is different than FullKey2 data
  > refers to FullKey2 data and is different than Fullkey1 data


  REG COMPARE HKLM\Software\MyCo\MyApp HKLM\Software\MyCo\SaveMyApp
    Compares all values under the key MyApp with SaveMyApp

  REG COMPARE HKLM\Software\MyCo HKLM\Software\MyCo1 /v Version
    Compares the value Version under the key MyCo and MyCo1

  REG COMPARE \\ZODIAC\HKLM\Software\MyCo \\. /s
    Compares all subkeys and values under HKLM\Software\MyCo on ZODIAC
    with the same key on the current machine
Disclaimer: Taken from a Win7 box.

How To Ask Questions The Smart Way

Report •

December 7, 2012 at 18:15:36
Hi, Razor 2.3
Thanks for your solution, and i'm sorry for wrong discussion place.

But I've seen it in C:\WINDOWS\help\ntcmds.chm
The problem is how to call the user registry for in compare with the default, so if the results different followed by REG RESTORE.
How can it work?

Report •
Related Solutions

Ask Question