Problems with compiled HTML Help (.chm) files

When the beta of Windows Installer 4.5 became available, first thing I did was downloading the white papers and the SDK documentation, which comes as compiled HTLM Help file msi.chm. But when I launched the help file it didn't work.

When I double clicked the msi.chm file the usual security dialog was displayed, warning me that files downloaded from the internet can be harmful:

Security warning dialog
Security warning dialog

After confirming that I wish to open it, the help window opened, but the content pane only displayed error messages like in these screenshots:

Initial error message after opening the help file
Initial error message after opening the help file

Error message after selecting a topic
Error message after selecting a topic

To see if the problem only affects me I contacted fellow MSI expert Christopher Painter to see if the help file works for him, which it does. Christopher pointed me to the following knowledge base article, but unfortunately this was not the cause for my problem (the msi.chm file was on my local hard disk):

Christopher also suggested that it might be some IE securtity issue. That pointed me in the right direction. I moved the chm file from my NTFS formatted hard disk to a FAT formatted USB memory device, and then back to the hard disk. I did this to remove the information that the file was downloaded from the internet, which Windows stores in an extra stream that can only exist on NTFS.

After this operation the msi.chm file worked! I also reproduced the problem with another .chm file I downloaded from elsewhere, with the same result. So this appears to the a general problem with .chm files.

Later I found another workaround. On the Connect site there also a download manager ActiveX control (called FTM - file transfer manager) which apparently also removes the meta information from the downloaded file. So using FTM instead of directly downloading the msi.chm file also avoids the problem.

Published Friday, August 31, 2007 9:15 PM by stefan

Comments

# re: Problems with compiled HTML Help (.chm) files

Hi Stefan,

You can right-click on the file to open the file properties dialogbox, then click the "Unblock" button and that should do the trick :-)

DM

Friday, August 31, 2007 7:43 PM by dmurillo

# re: Problems with compiled HTML Help (.chm) files

I learn something new every day - thanks!

Saturday, September 01, 2007 4:16 AM by stefan

# re: Problems with compiled HTML Help (.chm) files

I believe you can also get there by unchecking the "Always ask before opening this file" checkbox when you double click the .chm.

What's really happening here is that IE7 adds an additional data stream to any file that it downloads.  The additional data stream marks the file as originating from the internet and containing possibly hostile content.

See msdn2.microsoft.com/.../aa364404.aspx for more information on file streams.  They're a relatively unused feature in Windows, but if you ever wondered where all that metadata that's shown on the property page for your readme.txt was stored, now you know.

Tuesday, September 04, 2007 11:56 AM by Richard

# re: Problems with compiled HTML Help (.chm) files

A tool that I never noticed before...

Wednesday, September 05, 2007 5:00 PM by Christopher Painter