2018-01-25 10:11:44 +00:00
|
|
|
# reg compare
|
|
|
|
|
|
|
|
> Compare keys and their values in the registry.
|
2022-10-04 16:06:23 +01:00
|
|
|
> More information: <https://learn.microsoft.com/windows-server/administration/windows-commands/reg-compare>.
|
2018-01-25 10:11:44 +00:00
|
|
|
|
2024-03-07 04:45:02 +00:00
|
|
|
- Compare all values under a specific key with another key:
|
2018-01-25 10:11:44 +00:00
|
|
|
|
2024-03-07 04:45:02 +00:00
|
|
|
`reg compare {{key_name1}} {{key_name2}}`
|
2018-01-25 10:11:44 +00:00
|
|
|
|
2024-03-07 04:45:02 +00:00
|
|
|
- Compare a specific [v]alue under two keys:
|
2018-01-25 10:11:44 +00:00
|
|
|
|
2024-03-07 04:45:02 +00:00
|
|
|
`reg compare {{key_name1}} {{key_name2}} /v {{value}}`
|
2018-01-25 10:11:44 +00:00
|
|
|
|
2024-03-07 04:45:02 +00:00
|
|
|
- Compare all [s]ubkeys and values for two keys:
|
2018-01-25 10:11:44 +00:00
|
|
|
|
2024-03-07 04:45:02 +00:00
|
|
|
`reg compare {{key_name1}} {{key_name2}} /s`
|
2018-01-25 10:11:44 +00:00
|
|
|
|
2024-03-07 04:45:02 +00:00
|
|
|
- Only [o]utput the matches ([s]ame) between the specified keys:
|
2018-01-25 10:11:44 +00:00
|
|
|
|
2024-03-07 04:45:02 +00:00
|
|
|
`reg compare {{key_name1}} {{key_name2}} /os`
|
2018-01-25 10:11:44 +00:00
|
|
|
|
2024-03-07 04:45:02 +00:00
|
|
|
- [o]utput the differences and matches ([a]ll) between the specified keys:
|
2018-01-25 10:11:44 +00:00
|
|
|
|
2024-03-07 04:45:02 +00:00
|
|
|
`reg compare {{key_name1}} {{key_name2}} /oa`
|
|
|
|
|
|
|
|
- Compare two keys, [o]utputting [n]othing:
|
|
|
|
|
|
|
|
`reg compare {{key_name1}} {{key_name2}} /on`
|