This 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).
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!
How to compare two .REG files
The most basic usage is just specifying two filenames.
regdiff.exe foo.reg bar.reg
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 using the /r option.
regdiff.exe REG:HKEY_LOCAL_MACHINE\SOFTWARE hklm_software.reg
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.
- 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:
HKEY_LOCAL_MACHINE\Software\foo HKEY_LOCAL_MACHINE\Software\foo\test\one HKEY_LOCAL_MACHINE\Software\foo\test\two HKEY_LOCAL_MACHINE\Software\foo\hidden
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 reg:HKEY_LOCAL_MACHINE\SOFTWARE /4 /m hklm_software.reg
Note: The /4 option can be combined with any of the above options.
How to export a .REG file
You can use regdiff.exe to create a .REG file from an existing registry key by specifying a key and prefixing it with "REG:"
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
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
- 3.0 - completely rewritten in the best programming language in the World, with lots of new options