Recieve problem - WeOnlyDo Discussion board

Recieve problem (General questions)

by Maverick2004, Tuesday, February 15, 2005, 14:27 (7032 days ago)

I have a bit of a problem again, this time with the .Recieve method.
I logon to a Win2003 host with Telnet, and run a command. The output of this command, when run directly on the server, looks like below.

prosrm-2003:C:WINDOWSPrefetch, 1 browsable cycle(s)
5 browsable files of 5 total, 494 KB recoverable of 494 KB total

But when i run everything from within VB, the output looks like below.
It seems to miss the first few bytes, in this case prosrm-2003: .

C:WINDOWSPrefetch, 1 browsable cycle(s)
5 browsable files of 5 total, 494 KB recoverable of 494 KB total

Here´s my code, any suggestions as to why i get this behavior?
I don´t have any problems when i use SSH to Unix hosts.
[code]
With wodSSH1
.Disconnect
.HostName = server
.Login = user
.Password = psw
.Port = 23
.Protocol = Telnet
.TerminalType = dumb
.StripANSI = True
.Blocking = True
.Connect
.WaitFor regex:[C:>] , 5
.Prompt = regex:[C:>]
End With

If wodSSH1.DataReady > 0 Then wodSSH1.Receive
wodSSH1.Execute ( nsrim -X & vbCrLf)
temp = wodSSH1.Receive
[/code]
Cheers!
Maverick


Complete thread: