| |
yayh
Posts: 2
Score: 0
Joined: 6/19/2007
Status: offline
|
I am trying a vbs script to auto-logon to a telnet router. problem is the SendKeys are not being sent to the telnet window. i want run the script as a Scheduled Tasks. Can any one suggest a way of getting this working? Set oShell = CreateObject("WScript.Shell") 'Start up command prompt oShell.Run "Telnet -f telnetfile.txt" 'Send keys to active window; change the oShell.AppActivate "Telnet" WScript.Sleep 500 ' ip address as needed. oShell.SendKeys"open 192.168.0.1" 'Emulate the enter key oShell.SendKeys("{Enter}") WScript.Sleep 1000 'write the user name to the cmd window 'oShell.SendKeys"USERNAME" oShell.SendKeys"admin" oShell.SendKeys("{Enter}") WScript.Sleep 500 'write the password to the cmd window 'oShell.SendKeys"PASSWORD" oShell.SendKeys"admin" oShell.SendKeys("{Enter}")
|
|