Alternative to WinExec
Posted on 2000-05-05
I need to start different programs from my own program.
I store the address to the programs in TFilename's.
What I do is this:
I have a variable (FileN) of TFilename.
if WinExec(PChar(FileN),SW_SHOW)<32 then
messagedlg('error', mtInformation,[mbOk], 0)
But it only work for programs that does not access other files. It seems that the programs I load with WinExec search for the files they need in the folder of my program.
How do I tell them to act as if they were executed from their own folder?