>>>>
SET CLASSLIB TO PROCESS ADDITIVE
>>>>oRun = CREATEOBJ('API_APPRUN','awremote -M=D -N="MCIB"','C:\AW','NOR')
>>>>oRun.LaunchAppAndWait()
>>>>? oRun.CheckProcessExitCode()
>>>>oRun=NULL
>
>
>>This code completely replaces your old code to create and run the batch file.
>>
>Hi Ed:
>
>I dropped your class on the form and then replaced my code with your (shown above). Ran the form and clicked the connect button which has the code in the click event.
>
>Observation:
>1. The screen that I normally used to see, which is the AWRemote DOS screen where in it displays messages such as, Last Modem Response, Dialing etc., did not show up when I ran your code. Eventually, all I saw on the calling form was the display .NULL., which I think is in response to your "? oRun.CheckProcessExitCode()". In all, there was no DOS screen that showed up. Is this expected or does it suggest a problem. Normally, once the connection is made with the agency's computers, they then initiate a call back and pick up the files form the AW directory and then resurn a Valid report.
>
This suggests (as does the further noted error message) that AWRemote did not run. If AWREMOTE is not an .EXE, but a .COM or .BAT, for example, you need to inlude the file extension in the command line.
>2. I used the debugger to see what was happenning, and noticed that "lResult = 0"; and at one point your ".icErrorMessage = 'Process specified by icCommandLine could not be started.'
>
This is what actually failed - the awremote was not started.
>Another question:
>
>In my code, the following variable collect information about where the AW directory is stored.
>
>
mawdrive = programlocation.anywaredrv
>mawdirectory = programlocation.anywaredrc
>mawpath = alltrim(mawdrive)+":\"+alltrim(mawdirectory)+"\MCIBTELE.BAT type sdf"
>mfiletorun = alltrim(mawdrive)+":\"+alltrim(mawdirectory)+"\MCIBTELE.BAT"
>mawdirtochange = "cd \"+alltrim(mawdirectory)
>
>Your Code:
>
oRun = CREATEOBJ('API_APPRUN','awremote -M=D -N="MCIB"','C:\AW','NOR')
>
>Could I replace your 'C:\AW' which is hard coded in the above code, with mAWPath, but without the MCIBTele.bat following it?
Yes.