Re: WaitFor fails while Prompt works - WeOnlyDo Discussion board

Re: WaitFor fails while Prompt works (General questions)

by wodDamir, Saturday, November 01, 2008, 14:42 (5865 days ago) @ novanstar

Hi,

First thing I noticed is that you use Receive method after the Execute. This would probably hang, since Execute already receives the string and removes it from the buffer. In that case Receive doesn't have anything to receive and causes a hang/timeout.

Since Execute has return type as String, you should better use something like this:

someStringVariable = ssh1.Execute( yourCommand\r\n , your_prompt );

The second thing I notices is that you are trying to execute a command without sending an Enter key. You should add \r\n after the command (as in my above statement).

Can you please try those suggestions? Does that work?

Regards,
Damba


Complete thread: