JSI Tip 0598 - Compare local or remote Registry keys on computers running Windows NT or Windows 95.
July 10, 1998
contains Compreg, a 32-bit, command-line utility that compares local or remote Registry keys on computers running Windows NT or Windows 95..
Command-line syntax:
compreg key1 key2 [-v] [-r] [-e] [-d] [-q] [-n] [-h] [-?]
where:
key1 key2Local or remote Registry keys to compare (default: HKEY_CURRENT_USER) (example: \HOTDOGHKEY_LOCAL_MACHINESoftware) The Registry subtrees can be abbreviated as follows: HKEY_LOCAL_MACHINE lm HKEY_CURRENT_USER cu HKEY_CLASSES_ROOT cr HKEY_USERS us If key2 is the name of a computer, the key name specified in key1 is appended automatically. -vVerbose. Prints both differences and matches. -rRecurse into subkeys that only exist in one key. -eSets the error level to the error code that was in effect the last time the utility was run. By default, the error level is set to the number of differences that were found. -dPrints only the value entry names, not the actual values. -qQuiet. Prints only the number of differences. -nNo color in output. By default, color is used. -hDisplays additional help. -?Displays this screen.
Examples:
compreg "lmsystemcurrentcontrolsetcontrolsession manager" \JSI002
compreg HKEY_CURRENT_USERJerry HKEY_CURRENT_USERJennifer
Sample output:
2 DOS Devices!Mouse REG_SZ,[DevicePointerClass0] . . . . . . . . . . . . . snip . . . . . . . . . . . 1 Environment!PROCESSOR_IDENTIFIER REG_SZ,[x86 Family 5 Model 2 Stepping 5, GenuineIntel] 2 Environment!PROCESSOR_IDENTIFIER REG_SZ,[x86 Family 6 Model 3 Stepping 4, GenuineIntel] . . . . . . . . . . . . . snip . . . . . . . . . . . 1 Memory Management!IoPageLockLimit REG_DWORD,[8192] 2 Memory Management!IoPageLockLimit REG_DWORD,[4096] 1 Memory Management!PagingFiles REG_MULTI_SZ,[C:pagefile.sys 108 108|D:pagefile.sys 108 108|] 2 Memory Management!PagingFiles REG_MULTI_SZ,[C:pagefile.sys 96 96|] 2 Memory Management!SecondLevelDataCache REG_DWORD,[0] . . . . . . . . . . . . . snip . . . . . . . . . . . 1 !RegisteredProcessors REG_DWORD,[4] 2 !RegisteredProcessors REG_DWORD,[2] End of search : 29 differences found.
Notes:
Output produced by this utility consists of blocks of lines. Each block describes one difference. Each line starts with 1 or 2 (indicating whether it concerns key1 or key2), then the name of the key or value entry, and optionally the value type and data. Lines starting with an 'X' indicate values and subkeys that exist in both keys. Blocks containing one line indicate that a particular subkey or value entry is present only in that key. Blocks containing two lines indicate that there is a difference between the data types or actual values of the entries.
About the Author
You May Also Like