Help file location different than default installation directory

I have an application that stores the help file and other supporting stuff in "c:\program files\MyApp\help\MuApp.hlp" as defined in Project|Options.  The problem is, when users install the program to something other than the default location, my application can't find the help file.  And an ugly window pops up forcing the user to either find the help file themselves or forget about using the help.  Many of my users are not especially computer literate, so I'd like to avoid this.  A few users are highly computer literate so I don't want to take out the option of installing to somewhere other than the default location.

So, the question is: How can I program my application to look for the help file in a "/help" directory off of the directory where the application is installed?

BTW thanks to all the EE experts who helped me get the application this far...
LVL 1
prsteinAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

rwilson032697Commented:
Like this:

Application.HelpFile := ExtractFilePath(Application.ExeName) + '\Help\MyHelp.hlp';

(Put this in the DPR line after you initialise the Applicatiuon object...)

Cheers,

Raymond.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rwilson032697Commented:
Actually, you could even try:

Application.HelpFile := 'help\myhelp.hlp\';

Cheers,

Raymond.
0
prsteinAuthor Commented:
Thanks very much! I knew there had to be a (relatively) simple solution.

Paul
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.