Archived:Automating the Installation of NI Installers Versions 2.4x and Lower

Updated Feb 2, 2018

National Instruments does not actively maintain this document.

This content provides support for older products and technology, so you may notice outdated links or obsolete information about operating systems or other relevant products.

Reported In

Software

  • LabVIEW Full
  • LabVIEW Base
  • LabVIEW Professional

Operating System

  • Windows

Issue Details

How can I create a silent installer for National Instruments software products with NI Installers version 2.4x and previous?

Solution

There are two methods which you can use to install or uninstall National Instruments products silently.

Silent Installation with Default Options

Here are a set of steps for creating a silent installer/uninstaller for LabVIEW but the steps apply to most other National Instruments software products.
  1. Insert your LabVIEW CD.
  2. Click on Start»Run and type cmd to open the Windows Command Prompt.
  3. Type D: (where D is the drive letter of your CD drive)
  4. Type setup /h. This will bring up the following window, showing the optional parameters available when calling setup.exe.

    Figure 1: Setup Help
  5. Based on the information in the dialog, to run the LabVIEW installer silently you would type:
    setup /q /AcceptLicenses yes

    Figure 2: Command Prompt Window
You can verify that the silent installation has started by going to the Windows Task Manager and checking for setup.exe as a process. Your computer may be restarted as part of the silent installation. This method does not allow you to customize what components will be installed.

Silent Installation with Configuration

Create a configuration file called a spec file to define which features in an installation should be enabled and disabled by default.

Where to Find the Spec File

Most of the National Instruments installers have a default spec file that you can use as a template to modify how the installer behaves. This file is usually found in a support folder, such as suppfiles or supportfiles with a name similar to productName.spec, template_spec.txt, or sample.spec. For LabVIEW the example
spec file is called silent_install.txt and it is located in the bin folder of the installation CD. 
 

Modifying the Spec File

The spec file contents will affect which features are enabled or disabled by default during the installation. You can modify what should be installed by modifying the spec file. There are two main categories which will be useful: 
  • Features which are used to determine which product features will be installed by default.
  • Directories which describes where each feature would be installed.
The valid Feature states are Local, Absent, NoChange, and Default. Default is equivalent to not listing the feature in the spec file; the feature follows its default behavior based on level, dependencies, etc. 

The following table summarizes the Local, Absent, and NoChange Feature states.
StateIf the Feature Is Already InstalledIf the Feature Is Not Installed
LocalLeave it installedInstall it (on the local hard drive)
AbsentUninstall itDo not install it
NoChangeLeave it installedDo not install it

For each feature in the installer, you can specify where that feature will be installed in the Directories section of the spec file.
[Directories]
=C:\Program Files\National Instruments
Feature1=C:\MyFeature1Location
Feature2=D:\MyFeature2Folder\Location


For example, if you wanted to install LabVIEW into a folder named LV_82_full you would place the following command in the directories section:
NILV.LV820.001 = C:\Program Files\National Instruments\LV_8.2_Full\

Using the Spec File in Installation

To run your installer with a spec file, pass the spec file as a command line argument.
setup.exe "path to spec file"

If you prefer to run the installation using your spec file silently, you can combine the /q silent installation and the spec file by using the following format:
setup.exe "path to spec file" /q /AcceptLicenses yes

Additional Information

The following image shows a spec file that is configured to install LabVIEW, LabVIEW Run-Time Engine, Remote Execution Support for NI TestStand and the Device Drivers CD.

Figure 3: Spec File

The command to call setup using a spec file named install.txt located in the C: drive would be: 
D: setup "C:install.txt" /q /AcceptLicenses yes

WAS THIS ARTICLE HELPFUL?

Not Helpful