I have written a VBScript, say activate.vbs, and have trouble running it in InstallAnywhere 2011.
I can run the script in DOS using
wscript activate.vbs
What it does is to open a Telnet session and then run some commands.
I used "Execute Target File", "Execute Command", and "Execute Script/Batch file", but nothing worked for me.
Any help would be appreciated.
The activate.vbs code is as follows:
DIM objShell
DIM domain, telnet_port, usrname, pass
SET objShell = WScript.CreateObject("WScript.Shell")
domain="xxxxxx"
telnet_port=23
usrname="xxx"
pass=""
objShell.run"cmd"
WScript.Sleep 1000
objShell.SendKeys"telnet " & domain & " " & telnet_port
objShell.SendKeys("{Enter}")
WScript.Sleep 1000
objShell.SendKeys"logon " & usrname
objShell.SendKeys("{Enter}")
WScript.Sleep 1000
objShell.SendKeys(pass)
objShell.SendKeys("{Enter}")
WScript.Sleep 1000
objShell.SendKeys"exit"
objShell.SendKeys("{Enter}")
WScript.Sleep 1000
WScript.Quit 1
I can run the script in DOS using
wscript activate.vbs
What it does is to open a Telnet session and then run some commands.
I used "Execute Target File", "Execute Command", and "Execute Script/Batch file", but nothing worked for me.
Any help would be appreciated.
The activate.vbs code is as follows:
DIM objShell
DIM domain, telnet_port, usrname, pass
SET objShell = WScript.CreateObject("WScript.Shell")
domain="xxxxxx"
telnet_port=23
usrname="xxx"
pass=""
objShell.run"cmd"
WScript.Sleep 1000
objShell.SendKeys"telnet " & domain & " " & telnet_port
objShell.SendKeys("{Enter}")
WScript.Sleep 1000
objShell.SendKeys"logon " & usrname
objShell.SendKeys("{Enter}")
WScript.Sleep 1000
objShell.SendKeys(pass)
objShell.SendKeys("{Enter}")
WScript.Sleep 1000
objShell.SendKeys"exit"
objShell.SendKeys("{Enter}")
WScript.Sleep 1000
WScript.Quit 1