Shrinking Your Application Installer

Bundling all of the device drivers and the LabVIEW runtime along with your executable in a single installer can be a convenient way to distribute your application, but the result can easily be gigabytes in size, making it cumbersome to store and move around

You only really need all of the drivers the first time you install your application – so it makes sense to separate these into their own installer, and create a second smaller installer that just contains your application’s executable along with any supporting files that have changed


First, set up a Build Specification for the Full Installer as you would normally, including the LabVIEW Runtime and all the required drivers in addition to your application and any support files it uses

Additional Installers tab of Installer Properties dialog, showing LabVIEW 2018 runtime selected

Additional Installers

Next, create a copy of the Full Installer by right-clicking on it and selecting Duplicate, and then renaming it

Project windows showing original and copied Installer Build Specifications

Project with Multiple Installers

By default, LabVIEW will give this new installer its own Upgrade Code, so make sure that you copy the code from the Full Installer. This lets Windows know that both installers are for the same program – see this post for more details

Go into the Build Specification’s properties and remove all of the Additional Installers.

Remove Additional Installers

Now you can build the executable and then the two installers. When you are setting up a new system that doesn’t already have the LabVIEW runtime or drivers, you will need to use the Full Installer but for other updates you can use the much smaller Update Installer


You may run into some issues if you are not careful with the versions of the executable packaged inside each installer

The installer can get pretty confused if you try to ‘upgrade’ to an earlier version by mistake. When doing some tests, I had expected the installer to simply refuse to overwrite the executable if the existing file had a higher version number, but instead I found that it would actually delete the exe, leaving the rest of the folder structure intact

Where’s my exe?

Running the installer again would then say there was a newer version already installed, but by then it was too late

The best advice I’ve seen (from this thread on NI’s forum) is to create a Full Installer and leave it as v1.0, then update just the Upgrade Installer whenever a new exe is built. This guarantees that the updated exe version will always be higher than the existing version, without having to resort to scripting to keep everything in sync


Subscribe to our newsletter

Did you find this post helpful? Sign up to the Lonely Ant newsletter to get more useful tips delivered directly to your mailbox

Unsubscribe at any time. I will not share your information with third parties.

* indicates required

Why does my LabVIEW Installer replace the wrong program?

Have you ever built an installer for your LabVIEW project and had it unexpectedly remove another installed application – or refuse to install because there’s a higher version already installed, and you know that’s not the case?

Both of these problems have the same root cause – multiple installers are using the same Upgrade Code. This is straightforward to fix, but leads to some very confusing behaviours if you don’t know what is going on

The Upgrade Code is a unique ID that is used by the MicroSoft Installer (MSI) to determine whether an installer is creating a completely new application installation, or upgrading an existing one. Any installers with the same Upgrade Code are assumed to be installing the same application, regardless of the file names or locations they actually modify

Creating a new LabVIEW project by copying and pasting an existing one will leave you with two projects using the same Upgrade Code, unless you update the code for the new project

To change the Upgrade Code, just open up the Build Specification for your installer and go to the Version Information tab. You will see the Upgrade Code at the bottom of the page – click on the Generate button to create a new one

Installer Properties dialog

Installer Properties

You might wonder why LabVIEW doesn’t automatically update the Upgrade Code on its own?

There are actually some good reasons to allow multiple installers to have the same Upgrade Code. For example you can create a full installer with all of the drivers and other required files bundled to do a complete installation from scratch, and also have a much smaller upgrade installer that just updates the executable and any support files that have changed – check out this post to see how


Subscribe to our newsletter

Did you find this post helpful? Sign up to the Lonely Ant newsletter to get more useful tips delivered directly to your mailbox

Unsubscribe at any time. I will not share your information with third parties.

* indicates required