Problem with file links in CHM files.

Please post all questions and comments regarding Help & Manual 7 here.

Moderators: Alexander Halser, Tim Green

Post Reply
tonyvsuk
Posts: 8
Joined: Thu Apr 26, 2012 11:34 am

Problem with file links in CHM files.

Unread post by tonyvsuk »

Hello all,

I've got a help system, and in it are some links to files on the hard drive (examples).

Problem is, the CHM seems to have the same active folder as the parent application. This means the relative file links don't work.

I've tried changing the active folder (in my app written in C) using _chdir(), and this works temporarily, but that has knock on effects on the application. I've also tried changing the active folder, launching the help and then changing the folder back to what it was originally, but the CHM seems to pick up the current working folder of the app.

Any ideas? The documentation says it should work if the files are in the same folder as the CHM file (which they are).

Thanks in advance,

Tony.
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Problem with file links in CHM files.

Unread post by Tim Green »

Hi Tony,

This is normal. CHM is a massively restricted format that also has a number of bugs that have been there since it was originally released with Windows 98. Among other things, it cannot link to anything that is not in the same folder as the CHM file itself. Alternatively you can also use a full absolute path including the drive letter, but that is often not practical because you may not know in advance where the CHM file is going to be.

Alternatively, you can use one of the CHM files in the Premium Pack add-on, which include scripting that allows the link to automatically turn your relative links into an absolute link on the fly (this still depends on the targeted files being in the place referenced by the relative links, of course). See here in the Premium Pack documentation for information on this:

http://www.it-authoring.com/info/pp3hel ... fixer.html
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
tonyvsuk
Posts: 8
Joined: Thu Apr 26, 2012 11:34 am

Re: Problem with file links in CHM files.

Unread post by tonyvsuk »

Thanks.

I'm puzzled as to why the premium pack add-ons are not part of the product. I've got the Pro version, but to do anything "professional" with it, I also need the add-on pack.
Post Reply