A CHM file is a compiled help file that consists of HTML pages. You can decompile an existing CHM file, add your custom pages, then recompile. To do this, you will need Microsoft’s HTML Help Workshop (hhw.exe) which is available as a free download. It may also be installed with your operating system.
- Open HTML Help Workshop (hhw.exe).
- From the File menu, select Decompile.
- Select a Destination directory.
- Browse to the compiled help file (CHM) to which you want to add custom pages.
- Click OK. HTML Help Workshop will decompile the CHM file. Your destination folder should contain all HTML pages, images, scripts and stylesheets used to compile the online help file.
Create Project File
The only thing HTML Help Workshop doesn't provide is the *.hhp file. This is the file that puts all of the pieces together and it’s not difficult to create.
- In HTML Help Workshop, select File > New.
- Choose Project and click OK to start the wizard.
- On the first page of the wizard, click Next.
- Browse to the destination directory (where the decompiled help resides) and give your *.hhp file a name. Click Save. Click Next to advance the wizard.
- Because you’re reassembling the decompiled help file, select all three checkboxes. You won’t have to re-create the TOC or index. Click Next to continue.
- Browse to the table of contents file (*.hhc) in the destination directory. Click Next.
- Browse to the index file (*.hhk) in the destination directory. Click Next.
- Click Add and select all *.html files in the destination directory. Click Next.
- Click Finish. Now you have a project file that you can modify.
- On the Project tab, click the Change Project Options button.
- On the Files tab, you will need to change the name of the CHM file that will be output. If you want the links to the online help file in the application and the Start Menu to continue to work properly, change the name of the CHM to match the name it was originally given. For example, if you’re adding custom pages to GeodatabaseManager.chm, then name the CHM file GeodatabaseManager.chm. Otherwise, links to this file will be broken or point to the installed version.
- Click OK to close the Options form.
Now that you have an editable project file (*.hhp), you can create your custom HTML pages.