How To Include And Run My Executable With My LabVIEW-Built Installer

Updated Aug 2, 2023

Environment

Software

  • LabVIEW 2014 Application Builder Module
  • LabVIEW 2014 Professional
  • LabVIEW Professional
  • LabVIEW Full
  • LabVIEW 2014 Full

I built an application using Application Builder, and now I would like my LabVIEW installer to run an executable after the installer completes. 
 

There are three configuration steps to create an installer that will run an executable after it finishes.

1.    Add the executable to the project:

a.    Navigate to the Project Explorer window of the project. 
b.    Right-click My Computer, and click Add File.

2.    Browse to the executable you’d like the installer to launch after it finishes and click the Add File button.

The executable should appear in the list under My Computer in the Project Explorer window.

3.    Include the executable in the installer:

a.    Right-click Build Specifications in the Project Explorer window and select New » Installer.
b.    Select Source Files in the Category list on the left side.
c.    Expand My Computer in the Project View by left-clicking the plus sign.
d.    Left-click the executable that appears in the expanded list, and verify in the Destination View that the selected destination is the project folder.
e.    Left-click the blue arrow that is between the Project View and the Destination View to transfer the executable to the destination project folder.

Continuing in the Installer Properties Window:

  1. Configure the installer to run the executable after installation is complete:

    1. Select Advanced in the Category List on the left side.

    2. Navigate to the Launch Executable After Installation portion of the Advanced dialog window. In LabVIEW 2009 and later, tick the Run Executable at End of Installer box.

    3. There are two buttons on the right side of the executable file path display. Left-click the Add Executable button.

    4. Select the executable from inside the project list, and click OK.


Now the executable path will be in the executable window, and the Command Line Arguments box is enabled for entering commands. Use this box if you want to send additional commands to the executable.

If you don’t need to send additional commands to the executable, click OK at the bottom of the Installer Properties window. The Project Explorer window will now list the installer underneath Build Specifications.
 

Additional Information

Caveat: This won't work if the executable attempts to run another NI installation. The built installer will still be running, and installations of NI software cannot run side by side. To install NI software, include it under the Additional Installers tab in the build specification.

For LabVIEW 5.0 - 7.1
  1. Add your executable as a Support File by clicking the Add Support File button on the Source Files tab. Then put the filename in the Run Executable After Installation section.
  2. Check the appropriate checkbox in the Advanced tab of the Application Builder (Create Distribution Kit in LabVIEW 5.0 and earlier).
    1.  To run multiple executables after the installer completes, you will need to use a batch file. See the Additional Installers in LabVIEW Application Builder KnowledgeBase article.
  3. Be aware of the following:
    1. The executable must be included as part of the build and installed by the main installer. It cannot be a separate piece distributed in parallel with the main installer.
    2. Specify the name of the executable by name only, not by path, in the Advanced tab. 
    3. Match the case of each letter in the name of the executable.