Page 1 of 1

Change Directory to where the EXE is

Posted: Thu Jul 12, 2007 10:01 am
by Ollie
I cannot rely on the users' shortcut to ensure I have the right "working directory"

How can I find the name of the directory of the EXE that is being run so I can change to the directory where the EXE is with

DirChange(ALLTRIM( CurDrive() + ":\" + EXEDIR????()))

Re: Change Directory to where the EXE is

Posted: Thu Jul 12, 2007 10:20 am
by Enrico Maria Giordano

Code: Select all

CFILEPATH( GETMODULEFILENAME( GETINSTANCE() ) ) + "YOUREXE.EXE"
EMG

Posted: Thu Jul 12, 2007 2:13 pm
by Ollie
Thank you very much.