gisterennogwel
Technical User
Hi there,
I've been using a script to manage our AccesPoints till this day. But now I've changed to XP and the script fails as XP handles a TELNET connection differently, can anyone pin out the problem in this script?
the c:\ap.txt looks like this;
With W2k the App could be found with the static name C:\winnt\system32\telnet.exe but with XP it’s no longer static as it is named after the connection!
Is there a way to alter this script so I can keep on using it with my new OS?
Thanks for your time.
Ronald.
I've been using a script to manage our AccesPoints till this day. But now I've changed to XP and the script fails as XP handles a TELNET connection differently, can anyone pin out the problem in this script?
Code:
'Created for MAC filtering maintenance
'opens a TELNET session to all AP's
filespec="C:\AP.txt" 'data file with IP addresses
dim a,s
s=createobject("scripting.filesystemobject").opentextfile(filespec,1,true).readall
a=split(s,vbcrlf)
set WshShell = CreateObject("WScript.Shell")
for i=0 to ubound(a)
if trim(a(i))<>"" then
'Launch telnet session from the command line
WshShell.Run "telnet " & a(i)
'Wait until the application has loaded
While WshShell.AppActivate("C:\winnt\system32\telnet.exe") = FALSE
wscript.sleep 100
Wend
'Bring the application to the foreground and fill with keys
WshShell.AppActivate "C:\winnt\system32\telnet.exe"
wscript.sleep 100
WshShell.SendKeys "user"
wscript.sleep 200
WshShell.SendKeys "{ENTER}"
wscript.sleep 200
WshShell.SendKeys "password"
wscript.sleep 200
WshShell.SendKeys "{ENTER}"
wscript.sleep 200
end if
next
the c:\ap.txt looks like this;
Code:
192.168.25.230
192.168.25.231
192.168.25.245
With W2k the App could be found with the static name C:\winnt\system32\telnet.exe but with XP it’s no longer static as it is named after the connection!
Is there a way to alter this script so I can keep on using it with my new OS?
Thanks for your time.
Ronald.