9.7. Comparing the Registry

Problem

You want to compare the registry on two hosts or compare the registry on the same host after you've installed an application or made other modifications to the registry.

Solution

Using a graphical user interface

  1. Use the Registry Editor (regedit.exe) to export part of the registry you want to compare for the two target servers (or before and after changes are made on the same server). See Recipe 9.4 for more information on exporting registry files.

  2. Open the WinDiff program (windiff.exe).

  3. From the menu, select File Compare Files.

  4. Select the exported registry files you created in step 1.

  5. Select View Expand or View Outline from the menu to see the differences.

Discussion

When you export the registry, you are simply exporting the contents of the registry to a text-based file, which you can use to compare against other export files. Windiff is just one example tool that can compare text files and show the differences. Some text editors can do the same (e.g., Textpad is a favorite of mine).

If you only want to see the changes that an application makes during installation, another option is to use the Sysinternals Registry Monitor tool. You can configure Registry Monitor to display only write events for a certain key. For more information on Registry Monitor, see Recipe 9.12.

See Also

MS KB 171780 (How to Use WinDiff to Compare Registry Files)

Get Windows Server Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.