When my program is started from the start menu it sets it's current directory to the location of the start menu or the users home folder, e.g. c:\Documents and Settings\Username. This causes it not to find any media or assets I need it to use.
There is a simple fix which is to set the "Start in" section of the shortcut however I've not found any way of doing this automatically as part of the install routine. As I don't want to have to screen a message saying, "Dear user please edit your shortcut", I'm not sure what to do.
Is there any way of setting the current directory for the application to the place where the application is installed (i.e. the location of the program executeable) so that when my program starts in c:\program files\my program\myprog.exe it will look in the directory of the program and NOT in any other location? CurrentDIR$ always returns the location of the $HOME for the user (yes I've tested).
I think there must be a way of doing this but I can't find it, any help gratefully recieved.
I know it sounds evil but to me the registry sounds like the answer here...
Thanks,
Darkheart
|