Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
RUN command botching up SET PATH commands...
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01168821
Message ID:
01169622
Vues:
28
This message has been marked as the solution to the initial question of the thread.
John,

You can use ShellExecute()
DECLARE INTEGER ShellExecute IN shell32; 
    INTEGER hwnd,; 
    STRING  lpOperation,; 
    STRING  lpFile,; 
    STRING  lpParameters,;   
    STRING  lpDirectory,; 
    INTEGER nShowCmd 

lcParams = ""
lcExe = "c:\newsparser\newsparser.exe"
lcStartIn = JUSTPATH(lcExe)
IF ShellExecute(0, "", lcExe, lcParams, lcStartIn, 1) <= 32
  * Error
ENDIF
...
See Re: How to display a pdf file Message #1048457 for nShowCmd values

>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
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform