I need somehow to break waiting in the fragment:
If InStr(S, StopOnText, CompareMethod.Text) > 0 Then
'Dim AR = New Renci.SshNet.ExpectAsyncResult
AR.AsyncWaitHandle.Close()
Shell.EndExpect(AR)
'Shell.Close()
End If