HLP and CHM Help files for Windows programs

Most Windows programs have an online help system, accessed by a Help menu item (leading to a Contents page), or by buttons marked "Help" (leading to help on specific topics). Pressing the F1 key may also invoke help. The help information is contained in a separate file (with HLP or CHM suffix) and the help viewer is part of the Windows operating system.

Before Windows Vista appeared in 2007, two help systems coexisted. The WinHelp system used HLP files; the newer HTMLHelp system used CHM files. Windows supported both systems. However, Windows Vista does not support the HLP format. Up to 2007, GEMPACK-related Windows programs (such as ViewHAR, TABmate, WinGEM and RunGTAP) used HLP help files. From 2007 on, all these programs have been released in new versions which use the CHM format -- so they will work with Vista.

In use, the two help systems are very similar. The CHM viewer is split into two panes; the left-hand pane shows a Contents list. With HLP you need to click a Contents button; the contents list then pops up in a separate window.

Which system is my program using?

For GEMPACK Windows programs, each particular EXE will use only ONE of the two systems. Generally, EXE files created 2007 or later use CHM -- the earlier EXEs use HLP. You can usually check this. For ViewHAR, go Help....About/Diagnostics and press the Diagnostics button. A diagnostic file should be displayed. For an older ViewHAR, the first few lines of this file were:
Program: ViewHAR
Version 3.10, 3/Feb/2006
Compiler version: Borland Delphi 5
Compiler flags: LongStrings PStrIsAnsi RangeChecking NoOptimization NotCheckCore

For a newer ViewHAR, we instead see:
Program: ViewHAR
Version 3.11, 11/Apr/2008
File: c:\gp\viewhar.exe
Help File: C:\gp\ViewHAR.chm [exists]
Compiler version: Borland Delphi 5
Compiler flags: LongStrings PStrIsAnsi RangeChecking NoOptimization NotCheckCore UseCHM

Note the UseCHM compiler flag and the name of the CHM help file.

You may notice that both CHM and HLP files for the same program are present on your hard disk. This is normal and harmless. Newer versions of ViewHAR.EXE will use the CHM file, older versions will use the HLP files (except on Vista, which forbids HLP).

By default, Windows Explorer hides file extensions (such as HLP or CHM). This can make it hard to distinguish HLP and CHM files. Here's the fix.


As of April 2007, we have heard of only a few problems with HLP or CHM files -- we have not been able to replicate any. Since the help viewer is not supplied by us (for both HLP and CHM files it is part of Windows), most problems are probably connected to the configuration of a particular PC.

If you want to report a Help-file problem, please mention:

Include the Diagnostic file (see above) with your report.

In some problem scenarios, when the CHM file is viewed, only the left (Contents) panel shows properly, while the right information panel gives an error message. This might happen if the help file was stored on a network disk, or if the CHM had arrived in a zip archive which had been opened using the built-in Windows zip support. You need to "unblock" the CHM file as described below.

Many (non-GEMPACK) users of HLP or CHM files have reported problems if they opened a help file stored on a network (ie, nonlocal) disk. Microsoft advises you not to do this: store your Help files on your own hard disk.

Some mysterious CHM help file problems have been solved as follows:

A way to view HLP files under Windows Vista, 7 and 8

Although Microsoft did not bundle with the above OS the WinHlp32.exe needed to view HLP files, they do let you download WinHlp32.exe here, to restore HLP online help functionality for older programs.

Go back to