Hi Kevin,
I'm not sure why you're using SYS(2004). It returns location of VFPvR.DLL. How is that releated to your application location? It seems you would be better of using
ADDBS(JUSTPATH(_VFP.ServerName))
When you call other VFP EXE using DO command it runs as a part of the calling application in it's environment, not as a separate EXE.
Can you clarify what you're trying to do?
>I have a question that I hope someone may have an answer for:
>
>Currently I have an executable that calls a second executable with the code..
>
>DO SYS(2004)+"MAIN.EXE"
>
>Our users have a shortcut that contains the first executable in the 'Target Location' box (e.g. 'C:\APP\CALL.EXE') and the directory for the data in the 'Start in:' box (e.g. 'X:\MAIN\DATA').
>
>I know there are other ways to do this but my question is this..
>
>I want to use either RUN or SHELLEXECUTE to run the second exe instead of DO but when I do so it seems that the program resets SYS(2004) to be the second executable instead of the first whereas the first way (using DO)it does not.
>
>Is there anyway around this? I tried putting the path of the calling exe in the shellexecute directory parameter but this also does not work.
>
>I know this one is somewhat vague but if anyone has any ideas I would sure appreciate it.
>
>Thanks!
--sb--