This content is not available in your preferred language.

The content is shown in another available language. Your browser may include features that can help translate the text.

Including Third Party Installers and Drivers in a LabVIEW Installer

Updated Jul 30, 2023

Environment

Software

  • LabVIEW Application Builder Module

I've created an executable for my application. I have other third party drivers (VIs) or installers (exe) that I want to ship with my installer. How do I include all of them in the same installer?

This can be done by running a batch file after the installer.
 
1. Include all your files (VIs and .exe) in your project including the batch file that will run this VIs.​
 

2. When creating the installer, add them as Source Files.
 

3. In Advanced tab choose Run executable at end of installation and select your batch file.
 

4. Your batch file will the run the commands you have programmed to it. For example copy VIs from one folder to instr.lib or run other executables/installers.

Additional Information

Batch files are supported by Microsoft. 

A batch file does the work of a mediator between you and the command prompt. It is a file – with .bat, .cmd, .btm file extensions – containing the CMD commands. When you run a batch file, the commands written in it are executed in the Command Prompt following a serial fashion. Otherwise, these would have to be entered manually, line by line. The set of commands is also known as a batch script.

Below you can observe an example code:
ECHO OFF 
xcopy "%cd%\Tektronix AFG 3000 Series" "C:\Program Files (x86)\National Instruments\LabVIEW 2016\instr.lib"  /E /I
start "C:\Program Files (x86)\National Instruments\LabVIEW 2018\LabVIEW.exe"
PAUSE

The second line copies the content of a folder called "Tektronik AFG 3000 Series" into the folder "...\instr.lib" where device drivers are hosted. /E and /I commands are used to copy all subfolders content and to create a directory if there is none.
The third line runs LabVIEW.exe after copying the files. This can be replace by your third party installer .exe.
First and fourth line are used for visibility purposes and can be removed.