Declare
Status
DeclareOnce
epAppFile
=
`FILE`
; Application file name with full path
DeclareOnce
epTimeout
=
5000
; "Wait for completion" timeout
; Start CMD process and open connection to it
Declare
PortID
RC_CommandPortSet
PortID
,
'cmd.exe'
; Run file ('^J^M' are for '\r\n')
RC_SendAndWait
Status
,
PortID
,
epAppFile
$
'^J^M'
,
'C:\'
,
epTimeout
; Check if timeout expired
If
Status
!=
0
Then
TMMessage
GT_ErrorID
,
`Out of sync`
; Timeout expired
; Close Connection
RC_Close
PortID
End