Introduction
Command-line syntax
Examples
Notes
Compreg is a 32-bit, character-based, command-line utility that compares local or remote Registry keys on computers running Windows NT or Windows 95.
compreg key1 key2 [-v] [-r] [-e] [-d] [-q] [-n] [-h] [-?]
where
OptionMeaning
key1 key2Local or remote Registry keys to compare (default:
HKEY_CURRENT_USER)
(example: \\HOTDOG\HKEY_LOCAL_MACHINE\Software)
The Registry subtrees can be abbreviated as follows:
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.
The following are examples of Compreg usage:
compreg "\lm\system\currentcontrolset\control\session manager" \\MOON
compreg HKEY_CURRENT_USER\Cheech HKEY_CURRENT_USER\Chong
The following are examples of possible output:
1 \Environment!Cpu REG_SZ,[i386] 1 \Memory Management!PagingFiles REG_MULTI_SZ,[C:\pagefile.sys 20|] 2 \Memory Management!PagingFiles REG_MULTI_SZ,[D:\pagefile.sys 43|] X \AnyKey!AnyValue REG_DWORD,[4] End of search: 3 differences found.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), followed by an exclamation mark (!), 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.
In the example above, the first block indicates that the Cpu value entry in the Environment subkey is only present on the first computer (key1). The second block indicates that the PagingFiles value entry on \\MOON are located on a different drive. The third block indicates that the AnyValue value entry in the AnyKey key exists in both sources.
For questions or feedback concerning this utility, please contact rkinput@microsoft.com.