2

Application exe along with chm help file is placed within a folder on network drive in Windows7.

Initially help(.chm) did not work(open fine but content wont appear) and security settings(trust applied) were changed and now we can double click to open the Help(chm) file correctly.

Problem: The issue is that the same help(.chm) fails to open when tried from within Delphi 6 application.

In delphi, help file code is as: Application.HelpFile='helpfilename.CHM'

Another interesting thing is the help file work from within application when application folder is placed in a local drive.

Thanks for the Help !!

  • Adding your Delphi version to this question might be vital. (Windows version and NAS type could also help.) – mg30rg Sep 23 '14 at 11:52
  • Its Delphi6 and Windows7 :-) – user3591738 Sep 23 '14 at 12:08
  • 3
    This is because CHM files are blocked by later versions of Windows. Right-click the file, go to properties, and unblock it. – Jerry Dodge Sep 23 '14 at 12:11
  • 2
    This is a "security" feature. See e.g. http://superuser.com/questions/75571/viewing-chm-files-across-the-network-in-windows-7 – MartynA Sep 23 '14 at 12:14
  • No unblock button there, and this help file opens when double clicked; Only fails when tried from within application. – user3591738 Sep 23 '14 at 12:14
  • Are you providing an absolute path or a relevant path? – Jerry Dodge Sep 23 '14 at 12:16
  • just provide the filename and put file in the same Applicaiton folder and it does work in the local drive. The issue arise when the app folder is placed over the network. – user3591738 Sep 23 '14 at 12:21
  • Try providing an absolute path on your app's startup. See if that works. – Jerry Dodge Sep 23 '14 at 12:21
  • Actually i did tried hardcoding the path over the network drive, but still the issue persist. – user3591738 Sep 23 '14 at 12:24
  • And I'm sure you've tried some of the most common Windows security solutions? For example, make sure both Sharing privileges and general permissions are set to allow you full access. – Jerry Dodge Sep 23 '14 at 12:28
  • Just rechecked all the permissions are given as Full Control, Modify, Read & Execute. Probably thats why we can double click to open the help(.chm) file directly. – user3591738 Sep 23 '14 at 12:41
  • 1
    What exactly is meant by "fails to open"? Does the help window open but with no content, or does nothing happen at all? Because when Delphi 6 was written, it did not support CHM files, only HLP files. There are free units that you can drop into Delphi 6 to support loading HTML Help (I know, I used them for years before upgrading to XE3). – J__ Sep 23 '14 at 12:47
  • Fail to open mean Help file does open but content does not appear. And the help file does work as required from within Delphi application BUT only on the local drive – user3591738 Sep 23 '14 at 13:02

1 Answers1

8

Windows blocks web and network content by default for HTML Help. There is a registry setting that can be applied that allows named content to be allowed through (we use this regularly for our customers).

Key: HKLM\Software\Microsoft\HTMLHelp\1.x\ItssRestrictions
Value: URLAllowList="\\networkpath\helpfolder";

Obviously change the path and directory name to suit. This is a semi-colon separated list.

J__
  • 3,777
  • 1
  • 23
  • 31
  • Registry settings wouldn't work as we have citrix image based pcs. However i resolved this issue by making the delphi application to copy the file locally in temp folder before opening it. – user3591738 May 05 '15 at 03:01