- 1 year ago
How to close cmd after LabVIEW code executes
To close the Command Prompt window after your LabVIEW code executes, you can use a simple batch script to run the LabVIEW executable and then close the Command Prompt window. Here's how you can do it:
Open a text editor (e.g., Notepad) and create a batch script with the following content:
batchstart "" /B <path-to-labview-executable>
exit
Replace
<path-to-labview-executable>
with the actual path to your LabVIEW executable.The
/B
option is used to start the LabVIEW executable in the background without creating a new window.Save the batch script with a
.bat
extension. For example, you can save it asrun_labview.bat
.Double-click the batch script to run it. It will start the LabVIEW executable and then close the Command Prompt window.
Keep in mind that if your LabVIEW code requires any command-line arguments or input, you can modify the batch script accordingly.