NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Execute Command liines from teststand

Hello, 

I'm trying to execute some commands usig cmd.exe in a TS sequence by the callexecutable step.

I've also followed instructions here: 

https://forums.ni.com/t5/Example-Code/Display-and-execute-command-lines-from-within-a-TestStand/ta-p...

and ran the example there contained. However, I was not able to correctly execute a command. 

Basically, what happens is that the command prompt is launched, but without any command.

Do you have an idea of what I'm doing wrong? 

Thank you in davance.

Best Regards

0 Kudos
Message 1 of 4
(55 Views)

Been able to reproduce this using TS2019 32Bit

 

The article states to run an Argument Expression of

 

"/c ping " + "\" + "Microsoft.com" + "\"

 

This in fact results in a runtime error onmy machine since the backslashes are not escaped properly

 

Leaving them out, you'll see the cmd prompt executing.

 

In the second part of the tutorial STDOUT is redirected to a StepProperty Item.

 

Doing so will show you no cmd window at all.

 

Can you confirm this behaviour?

 

 

 

 

0 Kudos
Message 2 of 4
(46 Views)

Hi,

my problem is already present at first step that should create a folder, but no folder is created, even changing the directory to work outside Disk C

 

 

0 Kudos
Message 3 of 4
(43 Views)

I guess, this is another escaping problem

 

"cmd /c if not exist \"C:\\Temp1\" mkdir \"C:\\Temp1\""

 

works on my PC

 

Message 4 of 4
(32 Views)