Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RUN command botching up SET PATH commands...
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01168821
Message ID:
01168834
Views:
21
John,

How and where in EXE_2 do you set PATH?

RUN VFP command calls your EXE from the current directory which is default for the program that initiates RUN. If you did not set the path in the code of the second EXE, or somehow else, then second EXE assumes the path from where the RUN is called.
Either set path in EXE_2, or call it with separate configuration file, or create a shrotcut with proper command line and start_in directory, and RUN it from EXE_1.



>I'm launching a VFP 8 application from within another VFP 8 application and am encountering a strange problem. When the first program launches the 2nd.... the 2nd program inherits the PATH of the first program... even though it has its own PATH statements explicitly set. Now... this 2nd program was built over a year ago now and runs flawlessly... so there is no problem with how that paths are set up. The first program is very simple in nature and is launching the 2nd application by means of: RUN /n &lcProgramLocation
>
>My question is... how can I launch a program using the RUN command but have it not use the first programs directory location?
>
>First Program:
>-------------
>c:\processWatcher\processWatcher.exe
>
>Second Program:
>--------------
>c:\newsparser\newsparser.exe
>
>...when processWatcher.exe launches newsparser.exe..... newsparser immediatly starts throwing errors because it cannot find any of its supporting files in c:\processWatcher\.... but why is it even looking there? It should be (and HAS always been) looking in c:\newsparser\ (it's own directory).
>
>Has anybody stumbled on this problem before? I have also tried using SET PATH commands from the processWatcher application prior to firing the RUN command to launch the new program... but this has had no effect. Any and all help is very much appreciated.
>
>Thanks!
>
>JM
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform