Sub AppStart (Args() As String)
Dim shl As Shell
shl.Initialize("shl", "ping", Array As String("localhost"))
shl.WorkingDirectory = "C:"
shl.Run(60000) 'set a timeout of 60 seconds
StartMessageLoop
End Sub
Sub shl_ProcessCompleted (Success As Boolean, ExitCode As Int, StdOut As String, StdErr As String)
If Success And ExitCode = 0 Then
Log("Success")
Log(StdOut)
Else
Log("Error: " & StdErr & ExitCode)
End If
ExitApplication
End Sub