The command: "reg COMPARE /?" is on Windows 11, 10, .. available
Here are some examples of using this command:
Example 1: Comparing all values ??under one key:
REG COMPARE HKLM\Software\MyCo\MyApp HKLM\Software\MyCo\SaveMyApp
- Compares all values ??under the
"MyApp" key with the values ??of
"SaveMyApp". Only differences are shown.
Example 2: Comparing a specific value among different keys:
REG COMPARE HKLM\Software\MyCo HKLM\Software\MyCo1 /v Version
- Compares the specific value
"Version" under the keys
"MyCo" and
"MyCo1". Only differences are shown.
Example 3: Comparing all child keys and values:
REG COMPARE \\ZODIAC\HKLM\Software\MyCo \\. /s
- Compares all child keys and values ??under
"HKLM\Software\MyCo" on the computer
"ZODIAC" with the same key on the current computer. Only differences are shown.
The output is in the form of symbols at the beginning of each line, where '=' represents matches, '<' represents differences in the first FullKey, and '>' represents differences in the second FullKey.
Note that the
`REG COMPARE` command does not compare registry branches directly, but rather to exported registry files or registry paths in the registry. Therefore, the command can be useful to identify differences between two parts of the registry.
If you want to compare the contents of two registry branches, you could do this manually by exporting the exported registry files of both branches into separate text files and then comparing those text files. Here is a general approach:
Example 4: Manual comparison of registry branches:
-- Export the first registry branch to a file:
REG EXPORT HKLM\Software\RegBranch1 RegBranch1Export.reg
-- Export the second registry branch to a separate file:
REG EXPORT HKLM\Software\RegBranch2 RegBranch2Export.reg
-- Compare the exported files with a text comparison tool of your choice. For example, using the
`FC` command in the command prompt:
FC /W RegBranch1Export.reg RegBranch2Export.reg
Or use a third-party text comparison tool.
The steps above allow you to identify the differences between the exported registry branches. Note that this approach is manual and does not perform automated verification.
If you need a more comprehensive, automated registry comparison tool, you might consider third-party software designed specifically for the task. Such tools can provide a visual representation of the differences and make the comparison process easier.