Problems with opening CHM Help files from Network or Internet

Problems with opening CHM Help files from Network or Internet



As a publisher of a Help Creation tool in Help Builder, I’ve seen a lot of problems with people not being able to run their help files properly. Here’s the scenario: You go ahead and happily build your fancy, schmanzy Help File and deploy it to your customer or let your customers download them off the Internet directly. 

The customer downloads the file, opens the zip file and copies the help file contained in the zip file to disk, then opens the help file and finds the following help file: 


 

 

...a help file that comes up with all topics in the tree on the left, but a Page Not found or Operation Aborted error in the IE content window; an IE error. The CHM file obviously opened since the topic list is there, but the Help Viewer refuses to display the content. Looks like a broken help file, right? But it's not - it's merely a Windows security 'feature' that tries to be overly helpful in protecting you. 


The reason this happens is because files downloaded off the Internet - including ZIP files and files cotained in those zip files - are marked as potentially malicious and so do not get full browsing rights on the local machine – they can’t access local content, which is exactly what help topics are. If you look at the URL of a help topic you see something like this:

  
mk:@MSITStore:C:\wwapps\wwIPStuff\wwipstuff.chm::/indexpage.htm

which points at a special Microsoft Url Moniker that in turn points the CHM file and a relative path within that HTML help file. Although it looks weird this still equates to a call to the local computer zone, the same as if you had navigated to a local file in IE which by default is not allowed.  Unlike IE you don’t get an option to allow access via the yellow header security bar that IE usually shows to allow overriding or setting permanent security options for local content.

Instead you get a page like above or one that says that Navigation has failed.

How to Fix This

The easiest way to fix this issue is to set properties on the CHM Html Help file and allow it to be opened right when you download or open it for the first time:


openHelpFile 


There’s more detailed information of the issue and links to Microsoft KB articles as well as some nasty workarounds for this issue here:http://www.helpscribble.com/chmnetwork.html. Unfortunately on newer versions of Windows you won't even see this dialog - you'll get straight into the help file but with the topic not displaying and no hint as to what's going on. 


Another option is to right click on the file's properties and 'Unblock' the file so that the security block is bypassed: 

unblock  

This latter approach is probably the better choice as it's not a global setting but specific to the particular help file. Once set Windows will display the help file properly and without any extra prompting for security. However, if you do the latter you have to do it to each file individually.


It's annoying as all hell that this sort of obtrusive marking is necessary, but it's admittedly a necessary evil because of Microsoft's use of the insecure Internet Explorer engine that drives the CHM Html Engine's topic viewer. Because help files are viewing local content and script is allowed to execute in CHM files there's potential for malicious code hiding in CHM files and the above precautions are supposed to avoid any issues. 

Other reference:

Why my CHM file does not work?

This question is, probably, one of those question, making IT guys crazy. But, actually, this is not really simple question and there are more then one reason for problems with displaying Compiled HTML files. Let’s get once forever through the reasons for this

1) You have not real CHM file 
This may be HLP (WinHelp) file for real, so first try to rename it into HLP (if you are not running Vista) and execute. For those happy Vista owners – try using converter(hh.exe). Vista not supports HLP files anymore.

2) CHM viewer component is not registered
Why this can happen? A lot of reason – don’t even try to understand. Just run from your command prompt “regsvr32 hhctrl.ocx” if you got “OK” – try to open file again. No result. Look closer to file name

3) Your CHM file has “#” (hash) character in file or directory name
Why this happens? Hash (#) is registered character for in document hyperlinks. This character can not be used (aline with “?”,”&” and “+” characters. All those have special meaning. Remove all hashes and other special characters from file and directory name

4) You have security update (optional) for Windows XP or Vista that blocks CHM files
After all this file is compiled HTML, so it can consist of harmful scripts. So one of patches block this type of content. As well it might be blocked by system policy, your IT department put on your machine. To solve it right click on CHM file and select Properties. Click “Unblock” button under “Advances” one in “General” tab. Hit “Apply”. Once you unblock the file successfully, the unblock button disappear.

5) CHM file is in restricted internet zone
The file might be on remote machine, NetApp, network drive, that exists in restricted zone or you trying to open it directly from unknown internet site. You can either copy it locally or change ItssRestrictions in registry. Run regedit, locate HKLM\SOFTWARE\Microsoft\HTMLHelp\1.x\ItssRestrictions. If the key does not exists – create it. Add new DWORD subkey named MaxAllowerZone and put there 1. Actually, you can use numbers from 0 to 4 (My Computer, Local Intranet, Trusted Sites, Internet Zone, Restricted Zone). In most cases, Local Internet Zone (1) is enough. You should feel comfortable with changing registry settings in order to use this method!

If after all all those methods you still can not open CHM file. Try to open it in Notepad. Sometimes, files, downloaded from internet actually error HTML page of the server. So check it.

One last thing. Be sure, that you paid for ebook, downloaded from one of P2P servers even after you read it as CHM. Writers works really hard to write books for you :)



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章