Best Practice Ezine #62 Windiff

Best Practice Ezine.  Computer Performance. Advertise

Best Practice Ezine #62 Windiff

Don’t you just love utilities with expressive names such as Windiff?  The concept behind Microsoft’s Windiff is simple, to compare files and display their differences.  Again like other tools, the power of Windiff comes from you imagining scenarios when it would solve your problems.

Topics for Windiff

Guy’s killer use of Windiff – To find settings in the registry

Judging my postbag, not many people realize the benefits of comparing files with Windiff.  However, like the all the best ideas, once you understand it becomes blindingly obvious.

Take the situation where you want to find a particular setting in the registry, for example, a setting on the Winlogon message box that you wish to control.

  1. Before you make any changes, export the registry with Regedit.
  2. Make the change, for example, reverse the tick in the checkbox
  3. Export the registry after the change.
  4. Compare the two .reg files with Windiff.

Incidentally, if you have other killer uses for Windiff, do let me know and I will publish them.

Guy Recommends: Tools4ever’s UMRAUMRA The User Management Resource Administrator

Tired of writing scripts? The User Management Resource Administrator solution by Tools4ever offers an alternative to time-consuming manual processes.

It features 100% auto provisioning, Helpdesk Delegation, Connectors to more than 130 systems/applications, Workflow Management, Self Service and many other benefits. Click on the link for more information onUMRA.

Getting Started with Windiff

I find that while Windiff is easy to get working, it leaves me with that lingering feeling that I never quite reach the bottom of its possibilities. For example, I rarely use Windiff for copying files. Windiff has two main modes: Windiff has two modes:
Compare files
Compare directoriesWindiff Windows Server 2003 Resource Kit

Let us start with Windiff’s number one job, comparing files.

When you first launch Windiff and seek to compare two files, beware of a tricky menu when Windiff asks for the names of two files in quick succession.  I emphasise this sequence because when I was a greenhorn, I thought either I was going mad, or Windiff had a bug.  My salvation was reading the screen, Select First File, then Select Second File – phew it’s that easy to get started.

The First Windiff TrickWindiff Expand

Once you have loaded the two files, I expect you want Windiff to identify the differences.  The trick is to click on 1 .\file and then click on Expand.

As ever Microsoft provide two ways of doing everything, and you could click on the Expand Menu and then select, ‘Both files’.

Down to Business – File ComparisonWindiff compare files

At the business end, Windiff homes in on every tiny difference between the two files, moreover for easy reading it highlights each difference.  The color coding extends into the margin so you can see which file corresponds to the red highlight and which to the yellow highlight.

If a line is the same in both files it only has one entry, which you see in normal black text.  Where there are differences, not only do you have the exceptions highlighted, but it gives you the line number.

The screen shot is taken from a regedit export.  As I mentioned earlier, one of my classic uses of Windiff is finding where in the registry Microsoft store particular settings.

Guy Recommends: The Free IP Address Tracker (IPAT) IP Tracker

Calculating IP Address ranges is a black art, which many network managers solve by creating custom Excel spreadsheets.  IPAT cracks this problem of allocating IP addresses in networks in two ways:

For Mr Organized there is a nifty subnet calculator, you enter the network address and the subnet mask, then IPAT works out the usable addresses and their ranges. 

For Mr Lazy IPAT discovers and then displays the IP addresses of existing computers. Download the Free IP Address Tracker

Zebra StripesWindiff zebra

After doing it best to match the files line-by-line, Windiff looks at the remaining parts.  Where there are sections which are different, but which correspond, in the sense that the part before and the part after match between the files, Windiff has a choice between displaying the lines as blocks or as interleaved.

Windiff uses a heuristic intelligence to decide whether the lines from the two files are similar.  If it judges that they are similar it displays them interleaved, otherwise it displays them as blocks.

Compare Folders with Windiff

A secondary job for Windiff is to compare whole folders or directories.  Just click on the File menu and select ‘Select Directories’.  This time you see both directories one under the other so there is no chance of confusion.

Windiff Options

Although there is nothing really exciting in the Options menu, they are worth checking.  In addition to the options,  check out the Expand menu and decide if you need to add or remove any of those options.

However, if you remove the tick next to ‘Show Identical Lines, it will help you track single changes in large files.

Windiff’s Mark Menu

It is easy to overlook the Mark menu. The job of this menu is to hide or exclude files in your search.

Windiff Command Line Options

My old friend ‘Barking’ Eddie insisted that I added this command line section.  As I may have mentioned in previous Eddie is an ex-UNIX man and is a founder of ‘Dos Diehards’.

Windiff Command Line Options:

-D Compare one directory only.
-F[flags] savefile Save composite file to ‘savefile’. The ‘flags’ may consist of one or more of I (identical), L (left), R (right), F (moved leFt), G (moved riGht), S (Similar left), A (similiAr right), X (exit after saving list).
(e.g. -FLF saves list of Left or moved-leFt lines).
-I file Reads list of files to compare, from the specified input file. Each line can contain one or two filenames, space delimited (with quoting, if filenames contain spaces). Use "-" as the filename to read from stdin. If a line contains only one filename, the file is compared to itself.
-N name NET SEND notification to ‘name’ at end of comparison.
-O Outline view (no automatic expansion).
-P Perverse comparison: breaks lines on punctuation.
-S[flags] savefile Save list of files to ‘savefile’. The ‘flags’ may consist of one or more of S (same), L (left), R (right), D (different), X (exit after saving list).
(e.g. -SLD saves list of Left or Different files).
-T Compare whole subtree.

Download Windiff

Summary of Windiff

Windiff is a handy utility for highlighting differences between files.  My ‘killer’ use for Windiff is discovering where menu settings correspond registry values.  Another job for Windiff is checking directories and reporting and differences in the file lists.


Lots of useful computer services

Solarwinds Orion NPM Review  • How to Shut Down Win8   •Win8 Eventlog   • Win8 FAQ  • Ezines

E 167 WinDiff  •E 131 BigInfo  •E 123 WinDiff   • E 102 SysPrep  •E 69 Perfmon  •E62 WinDiff

E 25 Event Trigger   • E 24 CacheMov  • E 18 Services  •E 16 Perfmon  • Exchange Monitor