03-20-2013 01:43 AM
Hi
I have made a Telnet vbs script that I want to be executed in TestStand.
For that purpose I use the Call_Executeable function.
But when I am running the vbs in TestStand I am getting this error: Telnet is not recognized as an internal or external command.
But when I am running the vbs from a normal CMD or Win7 it´s executing without any problem.
I am using Win7 and I have enabled the Telnet.
My script looks like this:
Set cloner = CreateObject("WScript.Shell")
cloner.run"cmd"
WScript.Sleep 500
cloner.SendKeys"telnet 192.168.103.10"
cloner.SendKeys("{Enter}")
WScript.Sleep 500
cloner.SendKeys"quit"
cloner.SendKeys("{Enter}")
WScript.Sleep 2000
cloner.SendKeys"exit"
cloner.SendKeys("{Enter}")
I can´t seem to see what the difference is between running the file from TestStand which starts the CMD and then executing vbs script or executing the vbs script in a CMD that I have manually opened?
Kind regards Jacob
03-20-2013 02:13 AM
I just did some further investigations:
When i make a Call_Executable and try to run Telnet.exe directly i can not find the Telent.exe using the Call_Executable file browser (Attacment: TestStandTelnetbrower).
But i can find it when i do a search in windows (Attacment: WindowsTelnetbrowser)I tried copying the Telnet.exe file to C: and then i was able to find and run the Telnet.exe in Teststand.
Any idea?
03-20-2013 09:58 AM
@Jacob(JCA) wrote:
Hi
I have made a Telnet vbs script that I want to be executed in TestStand.
For that purpose I use the Call_Executeable function.
But when I am running the vbs in TestStand I am getting this error: Telnet is not recognized as an internal or external command.
But when I am running the vbs from a normal CMD or Win7 it´s executing without any problem.
I am using Win7 and I have enabled the Telnet.
My script looks like this:
Set cloner = CreateObject("WScript.Shell")
cloner.run"cmd"
WScript.Sleep 500
cloner.SendKeys"telnet 192.168.103.10"
cloner.SendKeys("{Enter}")
WScript.Sleep 500
cloner.SendKeys"quit"
cloner.SendKeys("{Enter}")
WScript.Sleep 2000
cloner.SendKeys"exit"
cloner.SendKeys("{Enter}")
I can´t seem to see what the difference is between running the file from TestStand which starts the CMD and then executing vbs script or executing the vbs script in a CMD that I have manually opened?
Kind regards Jacob
The difference is probably your current working directory. Windows looks in the current working directory when you specify a program to run without a full path. When you ran the script manually you were probably running it from the directory that contains telenet.exe. You can set the current working directory settings for the call executeable step to get a similar behavior. Or you can specify a full path to telnet in your script.
-Doug