08-09-2011 04:14 AM
Hi All,
how to execute a system command with "call executable" step in teststand 4.2.1?
example as i want to quit a application.using "taskkill /f /im xxx.exe".And execute other system command(DOS).
BR
Johnny
08-09-2011 05:02 AM
08-09-2011 05:45 AM
Hi Norbert,
Thanks for your reply.
I have tried it as you input.I input "taskkill /f /im xxx.exe" in the Argument Expression.And windows can pop-up a DOS window.But it seems can not execute the command.The DOS windows hold on,no response.Only display:"C:\WINDOWS\system32>"
BR
Johnny
08-09-2011 06:09 AM
You need either /K or /C in front of the taskkill. Compare to the echo-parameter....
Norbert
08-09-2011 07:55 PM
Hello,
It is done.Thanks a lot.
BR
Johnny
03-31-2015 02:30 AM
Hi,
I want to run netstat -an | find "8080" command from command prompt using call executable in test stand. after that i would like take the std output to local variable.
03-31-2015 07:21 AM
You have to enter the following string (including all quotation marks!) in the Argument Expression:
"/k netstat -an|find \"8080\""
The return value can be stored by configuring a target variable on the Standard Output/Error tab >> Output Destination. Select "Store in Variable/Property" and pick a string variable (e.g. Step.StdOutput.Text).
Norbert
03-31-2015 03:52 PM
For commands that have their own corresponding exe, you don't need to use cmd.exe at all. Just call them directly from the callexecuteable step. For example:
cmd.exe is only needed if you need to issue a command that is builtin to the cmd.exe and not an exe of its own.
Hope this helps,
-Doug