It is a small command line tool to compare two registry files, export the registry, merge .REG files and much more. regdiff.exe is freeware with a very liberal BSD-style license (i.e. free for any use including commercial).
You can download the standalone executable and the complete sourcecode.
The marketing department tells me to write about its most outstanding features, so here they are:
* Compare, diff and merge .REG files
* Compare, diff and merge the registry
* Support for both ANSI and UNICODE style .REG files
* It's free!
1. How to compare two .REG files
The most basic usage is just specifying two filenames.
regdiff.exe foo.reg bar.reg
2. How to compare a registry key with a given .REG file
You can use regdiff.exe to compare any registry key with a given .REG file.
regdiff.exe HKEY_LOCAL_MACHINE\SOFTWARE hklm_software.reg
Alternatively, you can prefix the name with REG:
regdiff.exe reg:HKEY_LOCAL_MACHINE\SOFTWARE hklm_software.reg
3. How to export a .REG file
You can use regdiff.exe to create a .REG file from an existing registry key
regdiff.exe REG:HKEY_LOCAL_MACHINE\SOFTWARE /m hklm_software.reg
You can export your whole registry tree (i.e. both HKEY_LOCAL_MACHINE and HKEY_USERS) into a file by using REG: alone.
regdiff.exe REG: /m registry.txt
4. How to create a sorted .REG file
You can use regdiff.exe to create a sorted .REG file. Here, "sorted" means that all keys and all values inside keys are alphanumerically sorted (not case-sensitive). To do so, you must specify a single input file and use the /m option.
regdiff.exe example.reg /m sorted_example.reg
5. How to compare the current registry settings with a given .REG file
You can use regdiff.exe to compare the current registry with a given .REG file using the /r option.
regdiff.exe hklm_software.reg /r
The difference between the REG: syntax and the /r parameter
The /r parameter checks all registry keys that are mentioned in the .REG file.
6. The REG: syntax checks all registry keys that exist under the given registry key.
Example: say, you have a registry that has the following keys:
You want to compare this registry with a .REG file that contains
Here, using /r will not find foo\hidden, whereas HKEY_LOCAL_MACHINE\Software\foo will do so.
The .REG file format
The default file format is the unicode format introduced with Windows 2000. Its header reads Windows Registry Editor Version 5.00. You can also use the ANSI format REGEDIT4 used in earlier versions of Windows NT 4 by using the /4 option.
Example: Export the registry in REGEDIT4 format:
regdiff.exe HKEY_LOCAL_MACHINE\SOFTWARE /4 /m hklm_software.reg
Note: The /4 option can be combined with any of the above options.
The license of this software is Freeware, you can free download and free use this registry cleaner software.