|
-
Jan 12th, 2006, 05:41 AM
#1
Thread Starter
New Member
telnet
hello
I'm writing a script which use telnet to monitor a switch
this is my script
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "telnet.exe" & chr(13)
WScript.Sleep 5000
WshShell.SendKeys "open ipAdress"& chr(13)
WScript.Sleep 5000
WshShell.SendKeys "admin" & chr(13)
WScript.Sleep 5000
WshShell.SendKeys "pass" & chr(13)
WScript.Sleep 5000
WshShell.SendKeys "systat" & chr(13)
WScript.Sleep 5000
WshShell.SendKeys "Logout" & chr(13)
WScript.Sleep 5000
WshShell.SendKeys "quit" & chr(13) & chr(13)
WScript.Sleep 5000
WshShell.SendKeys "exit"& chr(13)
WScript.Quit
when i use systat the switch return a statistics about it
i want to return this result to a text file in my computer
how can i do it
some one can help me ?
thx
-
Jan 12th, 2006, 08:45 AM
#2
Re: telnet
Try
VB Code:
Text1.Text = WshShell.SendKeys "systat"
-
Jan 12th, 2006, 09:24 AM
#3
Thread Starter
New Member
Re: telnet
That does not function
-
Jan 12th, 2006, 01:12 PM
#4
Re: telnet
Download Scriptomatic2 to write scripts for you. I use CSCRIPT to return output to the console. I also can pipe it to a text file with the > parameter (or >> to append it)
VB Code:
cscript myscript.vbs > d:\temp\myscript.txt
-
Jan 12th, 2006, 02:47 PM
#5
Hyperactive Member
Re: telnet
Going too see if this Scriptomatic2 might help out on some of the Socket Programming i'm working on for C# ,under Socket Programming Therory..
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|