I have a script which will output the values of certain commands to the terminal?Can anyone help me to modify the script to write the output to a file?
:: Open a Telnet window
start telnet.exe 192.168.1.1
:: Run the scrip
cscript SendKeys.vbs
set OBJECT=WScript.CreateObject("WScript.Shell")
WScript.sleep 50
OBJECT.SendKeys "Administrator{ENTER}"
WScript.sleep 50
OBJECT.SendKeys "admin{ENTER}"
WScript.sleep 50
OBJECT.SendKeys "{ENTER}"
For i = 1 to 10
i = i - 1
OBJECT.SendKeys "voice profile list{ENTER}"
WScript.sleep 5000
OBJECT.SendKeys "system debug cpu{ENTER}"
WScript.sleep 2000
OBJECT.SendKeys "memm stats{ENTER}"
WScript.sleep 5000
Next
The "Telnet Scripting Tool" is what you need. I have used it in the past, and it works great. http://support.moonpoint.com/downloads/windows/network/Telnet/tst10.php
And if I recall correctly, it also negates the issue of the script hanging if the window loses focus.