LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Building an application

Solved!
Go to solution

I have successfully created a VI and compiled it to a .exe file that runs and works well.  The only issue is that the .exe immediately begins to run as soon as I open it.  This is a problem because the program starts running before I can enter any parameters, and because of it's default settings, it immediately throws the program into an infinite loop.  I can click the "Abort" button and force-stop the program, then enter all the necessary parameters, and then restart the program, but this is silly.  Is there any way to change this so that when I open the .exe file, it doesn't start running?

0 Kudos
Message 1 of 4
(2,312 Views)

An exe should run automatically. Your code should be written such that the user can enter the parameters and then click on a button to start. The toolbar should also be hidden. If not the entire toolbar, the abort button should not be visible.

0 Kudos
Message 2 of 4
(2,308 Views)
Solution
Accepted by LarsUlrich

This you need to handle in your VI, have a program or loop first which accepts all the parameters from user and once all the parameters are entered and valid give access to rest of the program. Just change the way of execution and you should be good,

0 Kudos
Message 3 of 4
(2,306 Views)

Although it IS correct and expected behavior for a program to start running when it is opened (like any windows program when you click its icon), you can change your executable's behavior by unselecting "Run When Opened" in the build specification.  This will cause it to open but the run arrow must be clicked to start it.  Unless you're de-bugging or have a specific reason to do this... don't, because it tends to confuse users who expect immediate execution.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 4 of 4
(2,297 Views)