Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Scheduled Tasks vbscript telnet

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,48521
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Scheduled Tasks vbscript telnet
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Scheduled Tasks vbscript telnet - 6/20/2007 12:20:15 AM   
  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}")
 
 
Post #: 1
 
 RE: Scheduled Tasks vbscript telnet - 6/20/2007 1:04:31 AM   
  dm_4ever


Posts: 2366
Score: 38
Joined: 6/29/2006
From: Orange County, California
Status: offline
Look here and search for telnet: http://www.visualbasicscript.com/m_47117/tm.htm

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to yayh)
 
 
Post #: 2
 
 RE: Scheduled Tasks vbscript telnet - 6/20/2007 9:57:14 PM   
  yayh

 

Posts: 2
Score: 0
Joined: 6/19/2007
Status: offline
w3Sockets it works   thank you very much 

(in reply to yayh)
 
 
Post #: 3
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Scheduled Tasks vbscript telnet Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts