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.
- Insert your LabVIEW CD.
- Click on Start»Run and type cmd to open the Windows Command Prompt.
- Type D: (where D is the drive letter of your CD drive)
- Type setup /h. This will bring up the following window, showing the optional parameters available when calling setup.exe.
Figure 1: Setup Help
- 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
, and 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
, and NoChange Feature
|State||If the Feature Is Already Installed||If the Feature Is Not Installed|
|Local||Leave it installed||Install it (on the local hard drive)|
|Absent||Uninstall it||Do not install it|
|NoChange||Leave it installed||Do 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.
=C:\Program Files\National Instruments
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
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