Academic Company Events Community Support Solutions Products & Services Contact NI MyNI
3 ratings:
 4.33 out of 5   

Show Running Code When Using System Exec VI (Verbose Mode)

Primary Software:
Primary Software Version: 8.5.1
Primary Software Fixed Version: 7.1
Secondary Software: LabVIEW Development Systems>>LabVIEW Professional Development System

When I call a Windows batch file with the System Exec VI, why doesn't it show the batch file commands as they run?


By default, the System Exec VI will not echo batch file commands as they are run.  To change this behavior, do the following two things.

  1. Change the command line constant to one of the following.
    • cmd /c <Path>:\BatchFileName.bat
      The /c option closes the Command Window automatically when the batch file finishes.

    • cmd /k <Path>:\BatchFileName.bat
      The /k option keeps the Command Window open when the batch file finishes.  The windows must be closed by clicking the close box or typing exit at the prompt.

  2. Wire a False constant to the wait until completion? (T) input terminal of the System Exec VI.  This is done in both of the above pictures.

If you place the word pause at the end of the batch file, and use the /c option, the batch file will prompt the user to Press any key to continue...  After the user presses a key, the Command Window will close.

Related Links:
KnowledgeBase 312FO2W0: Additional DOS Functions for System
KnowledgeBase 20M9IIHU: System Hangs When 'Wait for Completion' is TRUE for "DOS" Commands or Batch Files on Windows 95, Windows 98, or Windows ME


Report Date: 09/13/2004
Last Updated: 12/30/2010
Document ID: 3DCEEVZ6

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit