Alaska Software Inc. - Re: RunShell
Username: Password:
AuthorTopic: Re: RunShell
Andreas Gehrs-Pahl

View the complete thread for this message in:

Re: RunShell
on Sun, 22 May 2016 10:41:39 -0400
Udo,

>RunShell("msv3_best.php 00992852,5,Normal >msv3.arr","c:\php\php.exe ",.f.)

If you use this format of RunShell(), you can't use redirection, as the 
">msv3.arr" part isn't a command-line parameter for "c:\php\php.exe", but 
a directive for the command shell (usually "cmd.exe") that is created by 
the Xbase++ RunShell() function.

So, to allow any form of input or output redirection, you need to call a 
new command shell using the following syntax:

cCommand := "c:\php\php.exe msv3_best.php 00992852,5,Normal > msv3.arr"
RunShell("/C " + cCommand)

This will instruct the "cmd.exe" created by RunShell() to start a new, 
separate, command shell that will do the redirect. For more information, 
see also the documentation for the OS "cmd" command, by typing "cmd /?" 
on the command line.

Hope that helps,

Andreas

Andreas Gehrs-Pahl
Absolute Software, LLC

phone: (989) 723-9927
email: Andreas@AbsoluteSoftwareLLC.com
web:   http://www.AbsoluteSoftwareLLC.com
[F]:   https://www.facebook.com/AbsoluteSoftwareLLC