NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Call Executable - Close command prompt

Hello,

i am running the Call Executable step that executes a batch file.

In the batch file another exe file is called.

Now the question is: How can i close the appearing cmd window (which contains the batch-file command) so that the teststand-sequence can contine?

Currently teststand is waiting at the call executable that the called program is returning.

I tried the option "Wait for exit = No Wait" but this does not help.

 

Thx

0 Kudos
Message 1 of 8
(5,164 Views)

Strange, even pausing with the No Wait set!!  Are you able to post more information?

0 Kudos
Message 2 of 8
(5,130 Views)

You can reproduce this by creating a batch file and write the text "notepad" inside.

When running this file then Notepad is started and the command-window is opened until you close the notepad window.

This happens also identical if you run the batch-file direct from the windows-explorer.

Is there any way that this does not happen?

Thx

0 Kudos
Message 3 of 8
(5,128 Views)

Way ahead of you dude.  I did some testing before my previous post (I don't use the Call Executable step very often).  I created an EXE (in LabVIEW) and a Batch File that calls my LV EXE.  Created a TestStand sequence with a Call Executable step that calls my batch file.  I tried it with "Wait" and "No Wait" and I am not seeing the behaviour that you are describing which is strange. 

0 Kudos
Message 4 of 8
(5,126 Views)

Can you test what happens with "notepad" in your batch-file?

Is your lv-exe also still running and CallExecutabel can continue? strange

0 Kudos
Message 5 of 8
(5,119 Views)

The CMD Window opens, running the Batch file, and Notepad is launched.  When I manually close Notepad, it closes following by the CMD Window. 

 

If I set the Call Executable step To "Wait for Exit"  TestStand pauses at the Call Executable step until I close Notepad (and the CMD Window has closed). 

If I set the Call Executable step To "No Wait"  TestStand does not pause at the Call Executable step.

0 Kudos
Message 6 of 8
(5,116 Views)

Ok, my fault. Its working here too.

I thought that the command-window whould be closed when setting to "No Wait"....

But it works as it should when changing the Wait-option.

 

 

0 Kudos
Message 7 of 8
(5,110 Views)

Cool. I guess your EXE is not returning?

0 Kudos
Message 8 of 8
(5,102 Views)