Skip to content
Tutorials Center
My learning

Topics

Lesson 30 of 36 ยท Deployment

Building Executables and Installers

Turn a LabVIEW project into a standalone executable and installer: build specifications, startup VI, source file settings, the Run-Time Engine, drivers, shortcuts, and testing on a clean machine.

Developers run VIs inside the LabVIEW environment. Users do not have LabVIEW, so you give them an executable (.exe) and, if the program needs drivers or other components, an installer that sets everything up. Both are created from your project with the Application Builder, which is included in LabVIEW Professional or sold as a module in other editions.

LabVIEW is not available on this site, so each step is described precisely and a stand-in at the end checks a build checklist in Python.

What you ship

A deployed LabVIEW application consists of:

  • Your compiled VIs, packaged inside the .exe (or in an .llb/.lvlibp next to it).
  • The LabVIEW Run-Time Engine (RTE): a free runtime matching the LabVIEW version and bitness (32 or 64 bit) that executes compiled VIs.
  • Driver software the VIs call: NI-DAQmx, NI-VISA, vendor DLLs, .NET assemblies.
  • Support files: configuration files, calibration data, help files, images.

The RTE does not include a block diagram, so end users cannot see or edit your code (an option removes diagrams from built VIs).

Prepare the project

Building from a LabVIEW project (.lvproj) is required. Before you build:

  1. Put the top-level VI and everything it needs in the project. Use Dependencies to confirm all subVIs are found; a missing dependency causes a broken build.
  2. Use relative paths for data files. Use Application Directory or Current VI's Path > Strip Path so your program finds files next to the executable. Paths pointing into the development tree (for example C:\Dev\...) fail on user machines.
  3. Remember the built-application layout: VIs live inside the .exe, so Current VI's Path gives a path inside it. Use the Application Directory property or Get System Directory for files outside.
  4. Decide whether the app should have a menu bar, title bar and toolbar. Set them in the top-level VI's VI Properties > Window Appearance (Customize) so the window looks like an application.
  5. Run the VI Analyzer and your tests.

Create the build specification

In the Project Explorer: right-click Build Specifications > New > Application (EXE). The properties dialog has these categories:

Category What to set
Information Build specification name, target filename (the .exe name), destination directory
Source Files The Startup VI (the main VI, it runs when the app launches). Put other VIs under Always Included if you call them dynamically (by reference or by name); statically called subVIs are included automatically
Destinations Where to put support files; by default the .exe and a data folder
Source File Settings For each file: whether it is included, whether to remove the diagram, and where it goes
Icon The icon of the .exe (use a 256x256 .ico file)
Advanced Options such as enabling debugging in the built application, passing command-line arguments, and how the app handles its own name
Additional Exclusions Remove unneeded features to shrink the build
Version Information Company, product name and version number; Auto-increment the build number
Windows Security Request elevated rights only if you need them

Click Build. The progress window shows files and the end of the run lists the output folder.

VIs called dynamically (for example a plug-in loaded with Open VI Reference) are not detected as dependencies. List them under Always Included, with the correct destination, or the app fails at run time with a file-not-found error.

Build an installer

Right-click Build Specifications > New > Installer. Key pages:

  • Product Information: product name, installer destination, installation folder.
  • Source Files: add your application build as a Destination item, add shortcut definitions (Start Menu, Desktop).
  • Additional Installers: tick the components to bundle: LabVIEW Run-Time Engine, NI-VISA Runtime, NI-DAQmx Runtime, other NI drivers and any other required NI software, matched to the versions you developed with. This list is built from the dependencies you checked.
  • Shortcuts, Registry, Advanced (for example, installation of language packs).

Building the installer creates a Volume folder (setup.exe plus data) or a single archive you can copy to a USB stick or deploy over a network.

For large deployments consider NI Package Manager packages, Windows MSI creation tools, or Docker/VM images that already contain the RTE, so IT can manage the install.

Test on a clean machine

The most common deployment failure is "it worked on my computer". Test on:

  • A PC (or virtual machine snapshot) without LabVIEW or NI drivers installed.
  • The same Windows version and bitness that users have.
  • A user account without administrative rights, because file writes to Program Files fail. Write data to Public Documents or AppData.

Check: launch, instrument communication, data logging to the correct folder, window titles and icons, uninstall.

Command line and automation

Building can be automated with the LabVIEW command-line interface or the Application Builder API (Build invoke node, or g-cli/LabVIEWCLI). In continuous integration, the steps are usually: check out, run unit tests, run the VI Analyzer, increment the version, build the EXE and installer, archive the output.

Checklist as code

This small checker mirrors a pre-build checklist you would put in a script or in documentation. It is only a stand-in (nothing here builds LabVIEW code), but it shows how to make the list executable.

Python Pre-build checklist (stand-in)

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Other deployment forms

  • Shared library (DLL): build a Shared Library so C#, Python or C++ programs call your VIs through exported functions.
  • Source Distribution / Packed Project Library (.lvlibp): ship reusable code to other LabVIEW developers, with or without diagrams (libraries lesson).
  • Zip file: a portable archive of VIs.
  • Real-time and FPGA targets: deployed from the project to the target (NI CompactRIO or PXI) with the Real-Time Application build; the target needs the right RT software.
  • Web services: expose VIs as REST endpoints with the Web Service build spec.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What must be installed on a user's PC to run a LabVIEW executable?

    The free Run-Time Engine runs compiled VIs; LabVIEW itself is not required.
  2. 2. Where do you set which VI runs first in the built application?

    The Startup VI is selected under Source Files.
  3. 3. Why list a dynamically called VI under Always Included?

    Application Builder only follows static calls.
  4. 4. Which test most reliably finds missing-driver problems?

    A clean machine reveals every dependency you forgot to bundle.

Summary

  • Build executables and installers from a project using build specifications.
  • Choose the startup VI, include dynamically called VIs and use relative paths.
  • Installers bundle the Run-Time Engine and driver runtimes.
  • Always test on a clean machine, with a standard user account.

Next: Packed Libraries and Source Control