************************************************************************ * wwAPI :: CreateprocessEx **************************************** *** Function: Calls the CreateProcess API to run a Windows application *** Assume: Gets around RUN limitations which has command line *** length limits and problems with long filenames. *** Can do Redirection *** Requires wwIPStuff.dll to run! *** Pass: lcExe - Name of the Exe *** lcCommandLine - Any command line arguments *** Return: .t. or .f. ************************************************************************ FUNCTION CreateProcessEx(lcExe,lcCommandLine,lcStartDirectory,; lnShowWindow,llWaitForCompletion,lcStdOutputFilename)which allows capturing the StdOutput data and wait for completion. Since you are a Web Connection user that's easily available to you. Note though that it depends on wwipstuff.dll to handle the async wait loop and command line capture.
> >#DEFINE SW_HIDE 0 >DECLARE INTEGER ShellExecute ; > IN SHELL32.DLL ; > INTEGER nWinHandle,; > STRING cOperation,; > STRING cFileName,; > STRING cParameters,; > STRING cDirectory,; > INTEGER nShowWindow > >lcDir=GETENV("APPDATA") > >lcCmd = GetEnv("comspec") >lccdm = "dir" > >? lccmd, lcDir > >lcPrm = " /c qwinsta >> mytest.txt" >lcPrm = lcDir+"\mytest.txt" >lcPrm = " echo hello >> mytest.txt " > >=ShellExecute(0, "", lcCmd, lcPrm, lcDir, 0) >>