desmond lau
desmond lau

Reputation: 11

TST10 entered my command twice

I'm following an online tutorial here:https://www.youtube.com/watch?v=vv9j1pDkZvM to learn how to reboot my modem automatically using telnet and tst10. But I'm having problem with it when logging into my account.

I have 3 files. RebootBatch.bat, try.txt and TST10.exe

The code in RebootBatch.bat is like this:

cd c:/tst
tst10.exe /r:try.txt

Code in try.txt is like this

192.168.1.1
WAIT "Login:"
SEND "tmadmin\m"
WAIT "Password:"
SEND "tmadmin\m"
WAIT "->"
SEND "13\m"
WAIT "==>"
SEND "1\m"

But when I execute Reboot.bat it goes like this

BCM96338 ADSL Router
Login: tmadmin
tmadmin
Password: tmadmin

and wouldn't proceed.

I think it supposed to go like this

BCM96338 ADSL Router
Login: tmadmin
Password: tmadmin

So basically it insert the username "tmadmin" twice in the new line. How can I fix this? Since I'm not a programmer myself so please be more detailed on what I should do to fix this. Thanks in advance

Upvotes: 0

Views: 787

Answers (1)

desmond lau
desmond lau

Reputation: 11

Never mind. I found another solution to my problem.

I just execute the following code as vbs file and my modem will restart.

Option explicit
Dim oShell
set oShell= Wscript.CreateObject("WScript.Shell")
oShell.Run "telnet"
WScript.Sleep 3000
oShell.Sendkeys "open 192.168.1.1~"
WScript.Sleep 3000
oShell.Sendkeys "tmadmin~"
WScript.Sleep 3000
oShell.Sendkeys "tmadmin~"
WScript.Sleep 3000
oShell.Sendkeys "13~"
WScript.Sleep 3000
oShell.Sendkeys "1~"
Wscript.Quit

Upvotes: 1

Related Questions