Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RUN /N command syntax
Message
From
04/10/2007 23:41:14
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
04/10/2007 22:00:41
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01258791
Message ID:
01258802
Views:
15
>In DOS I would type this:
>
>
>"c:\Jay_Archive\Mainline\HL7 Archive Files\EMPS_Admin\instsrv.exe" EMPS ""c:\Jay_Archive\Mainline\HL7 Archive Files\EMPS_Admin\srvany.exe"
>
>
>And it works great.
>
>In Foxpro I'm trying this, but it doesn't work.
>
>
>RUN /N EVALUATE(FULLPATH(SYS(2000,'instsrv'))+'instsrv.exe' + ' EMPS ' + FULLPATH(SYS(2000,'instsrv'))+'srvany.exe')
>
>
>I've tried adding quotes and all that stuff. How can I execute this from Foxpro?
>
>UPDATE: And this would work ok just using what I type in DOS in the RUN /N command, if it didn't require the fully qualified path to run the EXEs. The paths may change for each client in production.

Well then just prepare the command string before using it - nobody said you MUST do this as a one-liner.
lcExe=fullpath(forcepath('instsrv.exe', justpath(fullpath(sys(2000, 'instsrv')))))
lcOtherExe=fullpath(forcepath('srvany.exe', justpath(fullpath(sys(2000, 'instsrv')))))
lcCmd=textmerge(["<<lcExe>>" EMPS "<<lcOtherExe>>"])
run /n &lcCmd
Though I personally prefer textmerging into a .bat file which is discarded after I'm done with debugging. So I can run it on my own and see what's wrong in it. Another preference of mine is to run the .bat file from API_AppRun. Somehow easier to handle (read: to tame), no pesky DOS windows unless you really want them, and you have some trace of what your command was. A macro is and then is gone.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform