p-nand-q.com | home | computer | humor | business | pictures | about

Computer

download

REGDIFF - Version 3.5

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).

Download

Starting with version 3.5, regdiff is part of gtools, which you can download here..

You can still also download the standalone executable and the complete sourcecode.

The marketing department tells me to write about its most outstanding features, so here they are:

How to compare two .REG files

The most basic usage is just specifying two filenames.

Example:

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.

Example:

regdiff.exe HKEY_LOCAL_MACHINE\SOFTWARE hklm_software.reg

Alternatively, you can prefix the name with REG:

Example:

regdiff.exe reg:HKEY_LOCAL_MACHINE\SOFTWARE hklm_software.reg

How to export a .REG file

You can use regdiff.exe to create a .REG file from an existing registry key

Example:

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.

Example:

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.

Example:

regdiff.exe example.reg /m sorted_example.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.

Example:

regdiff.exe hklm_software.reg /r

The difference between the REG: syntax and the /r parameter

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

HKEY_LOCAL_MACHINE\Software\foo\test

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.