TestStand Called Within Command Prompt Is Not Waiting to Finish Executing

Updated May 4, 2023

Reported In


  • TestStand

Issue Details

I am running a shipped example from Windows Command Prompt, but the command prompt returns immediately when I would expect it to wait until TestStand has finished executing. 
How can I fix this?


If you are using Command Prompt to call TestStand and run sequences from the Command Line Interface (CLI) you must use the start /wait command to ensure TestStand finishes it's sequence.

To demonstrate this, below is a step by step guide to call a shipped example, Computer Motherboard Test, and ensure the CLI waits:
  1. Open Command Prompt
  2. If the window/console shows anything other than C:\>, the type C: and press Enter.
    • The screen should now be on a new line starting with C:\>
  3. Change directory to the location of the user interface you use, using the command cd and press enter, for example:
    • cd "C:\Program Files (x86)\National Instruments\TestStand 2017\UserInterfaces\Full-Featured\LabVIEW\Source Code"
    • The screen should now be on a new line starting with: 
    • C:\Program Files (x86)\National Instruments\TestStand 2017\UserInterfaces\Full-Featured\LabVIEW\Source Code>
  4. Input the commands to start and wait the TestStand Engine, then Quit the Engine when complete and finally the commanad for TestStand to do an action using the commands from the Application Manager within TestStand. To call the Computer Motherboard Example to TestStand and ensure it waits before exiting input the following and press enter. 
    • start /wait TestExec.exe -Quit -RunEntryPoint "Single Pass" "C:\Users\Public\Documents\National Instruments\TestStand 2019 (32-bit)\Examples\Demos\Computer Motherboard Test\LabVIEW\Computer Motherboard Test Sequence.seq"
    • Note: The file path may be different for your computer and should be adjusted if you are using a different version of bitness of TestStand or different sequence.


Additional Information

To find the exit code from the ran sequence within the command prompt, you can use the command ECHO %ERRORLEVEL%. Alternatively, use –OutputToStdIO command-line flag to send additional status information for completed executions to standard output. 

The definition of each exit code outputted can be found here.