Saturday, 26 July 2008

How to Open Downloaded HTML Help (CHM) Files

Filed under: Software Applications — Jan Goyvaerts @ 11:30

Suppose you head over to the brand new docs.codegear.com site. You want to download the updated Delphi 2007 help files in CHM format. CHM files open instantly, while the Microsoft document viewer used by the Delphi 2007 IDE takes forever.

If you open the downloaded CHM file on a fully patched Windows XP system, or on Windows Vista, you may end up with an Internet Explorer error message instead of the actual help text beside the help file’s table of contents. Internally, the HTML Help system uses Internet Explorer to display the topics in a CHM files. Technically, a CHM file is a bunch of HTML files and other support files compressed into a single file. That means that a CHM file can carry the same payload as an actual web page, including any sort of malware that you can download. Because of this, Microsoft tightened the security restrictions in a Windows XP security update. On Vista, this is the default.

The main problem with the security restrictions is that CHM files don’t work via the network. Unless you change the security settings on your computer, you have to save the CHM file to a local hard disk to be able to view it.

Another issue, though more a nuisance than a problem, is that CHM files you downloaded to your local hard disk still have the security restrictions applied to them. To be able to view the help file, you have to turn off “always ask before opening this file” in the security warning. Only then will the file be displayed correctly.

CHM file security warning

If you produce your own CHM files for your customers, you may get complaints that they don’t work. Don’t be too quick to blame your favorite help authoring tool. Your customers are merely running into the security issues I’ve just mentioned. Explain them how to install the CHM file to their local hard disk using your setup program, or how to copy the file manually and unblock it.


  1. Or do like I did, and switch from a CHM help file to HTML files.

    Comment by Ryan Ginstrom — Sunday, 27 July 2008 @ 7:15

  2. Hi, how do you draw a red rectangle on the “Security Warning” picture? with photoshop?

    Comment by james day — Friday, 29 August 2008 @ 13:04

  3. I use Corel Photo-Paint, which is similar to Photoshop.

    Comment by Jan Goyvaerts — Friday, 29 August 2008 @ 15:59

  4. Windows .chm help file format is quite old and as a rule no longer used in new applications. I guess that’s why it’s not supported by browsers. But as a Windows application, .chm help file is still alive and supported. I would recommend people to put all help content on the internet – it reduces the size of the distributable installer and also easily accessible.

    Comment by George The Computer Specialist — Sunday, 7 December 2008 @ 3:57

  5. The CHM format became the standard Windows help format with Windows 98, so it’s indeed over a decade old now. Windows Vista uses a new help format. Unfortunately, Microsoft has not (yet) released that help format to 3rd party developers. So in the mean time, CHM remains the standard Microsoft help format.

    The CHM security issue is not a browser support problem. Internet Explorer specifically blocks CHM files, just like it does with EXE files and anything else that might carry malware.

    Comment by Jan Goyvaerts — Monday, 8 December 2008 @ 14:40

  6. Jan is right. I always have noticed that .chm files are standard help files for Win98. When it comes down to xp, xp has neglected the same i think. I had used VB to create documentation for my project in .chm format. I still don’t know about vista’s support though.

    Comment by Ken Fink — Friday, 27 March 2009 @ 20:25

Sorry, the comment form is closed at this time.