Microsoft Compiled HTML Help

This is an old revision of this page, as edited by 142.39.230.100 (talk) at 15:22, 2 November 2011 (Extracting to HTML: Removed the "citation needed" comment for decompile and put a link to where the documentation can be downloaded.). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Template:Infobox Windows component

Microsoft Compiled HTML Help
Filename extension
.chm
Internet media type
application/x-chm
Developed byMicrosoft
Initial release1997
Extended to.lit
StandardNo

Microsoft Compiled HTML Help is a Microsoft proprietary online help format. It was introduced as the successor to Microsoft WinHelp with the release of Windows 98, and is still supported in Windows 7.

History

In 2002, Microsoft announced security risks associated with the .CHM format, as well as security bulletins and patches.[1] They have since announced their intentions not to develop the .CHM format further.[2]

Month Year Description
February 1996 Microsoft announces plans to stop development of WinHelp and start development on HTML Help.
August 1997 HTML Help 1.0 (HH 1.0) is released with Internet Explorer 4.
February 1998 HTML Help 1.1a ships with Windows 98.
January 2000 HTML Help 1.3 ships with Windows 2000.
July HTML Help 1.32 releases with Internet Explorer 5.5 and Windows Me.
October 2001 HTML Help 1.33 releases with Internet Explorer 6 and Windows XP.
March At the WritersUA (formerly WinWriters) conference, Microsoft announces plans for a new help platform, Help 2, which is also HTML based.
January 2003 Microsoft decides not to release Microsoft Help 2 as a general Help platform.

File format

Help is delivered as a binary file with the .chm. It contains a set of HTML files, a hyperlinked table of contents, and an index file.

The file starts with bytes "ITSF" (in ASCII), for "Info-Tech Storage Format". The format has been reverse-engineered by Matthew Russotto with assistance from Peter Ferrie and Paul Wise.[3] Russotto's documentation is freely available at http://www.russotto.net/chm/chmformat.html.

On Windows computers a .chm can be built with the freely-distributed HTML Help Workshop.

The published help features:

  • Data compression (with LZX compression)
  • Built in search engine
  • Ability to merge a number of .chm help system
  • Extended character support although it does not fully support Unicode.[4]

The .chm file format's ability to contain and execute arbitrary code is a potential security threat, and viewing .chm files is sometimes restricted in the Windows OS.

Applications

The Microsoft Reader .LIT file format is a modification of the HTML Help CHM format. CHM files are sometimes used for e-books.[5]

Use on non-Windows platforms

Extracting to HTML

On Windows, a CHM file can be extracted to plain HTML with the command:

hh.exe -decompile extracted filename.chm 

This will decompress all files embedded in filename.chm to folder extracted.

You can also use HTML Help Workshop to decompile CHM files. File -> Decompile... For information on how to decompile, download the HTML Help Workshop documents from Microsoft

7-Zip will open .chm files as archives allowing access to all content.

On Windows, as a hack, select the topmost Topic, right-click and select Print. On the popup dialog, select "Print this heading and all subtopics.", click OK. Before selecting a printer, look in %HOMEPATH%\Local Settings\Temp for a file named ~hh*.htm. This is the concatenated HTML. The image reference will refer back to the .chm file at the time of the "print".

On Linux systems which use apt as a packaging tool, a CHM file is extracted to plain HTML with extract_chmLib (first command is for a Debian based OS):

 $ sudo apt-get install libchm-bin
 $ extract_chmLib tero.chm tero/

See also

References

  1. ^ WinWriters - Security and Microsoft Help
  2. ^ Microsoft HTML Help Workshop download page
  3. ^ HTML Help Maker on Paul Wise (Pabs)' website
  4. ^ INFO: Limited Unicode Support in HTML Help
  5. ^ Title Handbook of Data Compression Authors David Salomon, Giovanni Motta, David (CON) Bryant Edition 5, illustrated Publisher Springer, 2009 ISBN 1848829027, 9781848829022 Length 1359 pages
  6. ^ Displaychm, KDE Service Menu