Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Plink.exe and StdoutRead

$
0
0
I found this topic:
http://www.autoitscript.com/forum/topic/146337-solved-plink-error-output-not-coming-through-stdoutread/
but it doesn't seem to solve my problem.

I'm trying to create a script to help my guys provision new Cisco switches for deployment. I was hoping to find a nice, easy way to send data over a serial connection (similar to TCPSend), but alas.

I read a lot about mscomm32.ocx and netcomm.ocx, but there seem to be licensing issues. Plink seems to be a good bet, but my attempts at reading the output are not working. If I run plink manually, (to an unconfigured switch) I get a Switch>_ prompt. But when I run the same command here, my stdoutread loop never ends. Any way around this?

[ autoit ]      
#include $plink = Run(@ComSpec & " /c plink.exe -v -load serial","",@SW_HIDE,$STDIN_CHILD + $STDERR_MERGED) StdinWrite($plink,@CR) StdinWrite($plink) Local $data While True $data &= StdoutRead($plink) If @error Then ExitLoop WEnd MsgBox(0,"",$data)

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>