View Single Post
  #10  
Old 15.09.2013, 18:04
pop23_mx
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by pop23_mx View Post
Hola a mi me funcionó, aunque despues de algunos problemas.
Este fue el codigo que utilicé.

Code:
Option explicit
Dim oShell
set oShell= Wscript.CreateObject("WScript.Shell")
oShell.Run "cmd"
WScript.Sleep 300
oShell.Sendkeys "telnet~"
WScript.Sleep 100
oShell.Sendkeys "open 192.168.1.254~"
WScript.Sleep 100
oShell.Sendkeys "USUARIO~"
WScript.Sleep 50
oShell.Sendkeys "CONTRASEÑA~"
WScript.Sleep 100
oShell.Sendkeys "ppp ifdetach intf=Internet~"
WScript.Sleep 2000
oShell.Sendkeys "ppp ifattach intf=Internet~"
WScript.Sleep 100
oShell.Sendkeys "exit~"
WScript.Sleep 100
oShell.Sendkeys "q~"
WScript.Sleep 100
oShell.Sendkeys "quit~"
Wscript.Quit
Mi sistema operativo es Windows 8 de 64 bits. Para hacerlo funcionar tuve que copiar el archivo C:\Windows\System32\telnet.exe a la carpeta C:\Windows\SysWOW64
Con eso funciona a la perfección.
Si les da fallas el archivo .vbs conviertanlo a .exe yo use ExeFromVbs_v1.3 y así nunca falla.
Reply With Quote