LolaTheriotHow to restart a GSM Modem using VBScript-

Now you can restart a GSM Modem with the use of VBScript-

1. Copy the script code and save as a .vbs file.
2. Open hyperterminal and setup the modem settings, for this example save the hyperterminal file as c:\example\example.ht
3. Add the below vbs file to your c:\program Files\Windows NT directory and execute.

Important: If you saved the .ht as anything other than example.ht in c:\example rename the file in script below as well.

Set oshell = createobject(“Wscript.Shell”)
oshell.run”cmd.exe”
wscript.sleep 500
oshell.sendkeys “hypertrm.exe c:\example\example.ht”+(“{Enter}”)
wscript.sleep 1500
oshell.sendkeys “at{+}cfun=1” + (“{Enter}”)
wscript.sleep 4000
oshell.sendkeys”at” + (“{Enter}”)
wscript.sleep 1500
oshell.sendkeys “at{+}cfun=1” + (“{Enter}”)
wscript.sleep 4000
oshell.sendkeys”at” + (“{Enter}”)
wscript.sleep 1500
oshell.sendkeys”%f”
wscript.sleep 1500
oshell.sendkeys”x”
wscript.sleep 1500
oshell.sendkeys(“{Enter}”)
wscript.sleep 1500
oshell.sendkeys”exit”+(“{Enter}”)
set oshell = nothing

Set oshell = createobject(“Wscript.Shell”)
oshell.run”cmd.exe”
wscript.sleep 500
oshell.sendkeys “hypertrm.exe c:\example\example.ht”+(“{Enter}”)
wscript.sleep 1500
oshell.sendkeys “at{+}cfun=1” + (“{Enter}”)
wscript.sleep 4000
oshell.sendkeys”at” + (“{Enter}”)
wscript.sleep 1500
oshell.sendkeys “at{+}cfun=1” + (“{Enter}”)
wscript.sleep 4000
oshell.sendkeys”at” + (“{Enter}”)
wscript.sleep 1500
oshell.sendkeys”%f”
wscript.sleep 1500
oshell.sendkeys”x”
wscript.sleep 1500
oshell.sendkeys(“{Enter}”)
wscript.sleep 1500
oshell.sendkeys”exit”+(“{Enter}”)
set oshell = nothing

http://www.all1social.com
http://www.all1martpro.com

Tags: , , , , ,