Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
4 ratings:
 3.5 out of 5     Rate this Document

Automating the Installation of National Instruments Software - NI Installers Version 2.4x and Previous

Primary Software: NI Installers>>Installer Framework
Primary Software Version: 2.5.1
Primary Software Fixed Version: N/A
Secondary Software: LabVIEW Development Systems>>Professional Development System

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

Solution:
Note: To find out how to determine your version of installers, as well as how to silently install newer NI software, please see the related links section below.

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

National Instruments installers use a configuration file called a spec file. Using a spec file, you can specify exactly which features in an installation should be enabled and disabled by default. This is a powerful feature that facilitates automated installation and testing.

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.

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.

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. For example,

[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\

There is an example spec file attached to this KnowledgeBase that demonstrates how you can use a spec file to set which components to install. If there is a particular feature that you need to add to your script file and you cannot find the feature name, please contact NI Technical Support.

To run your installer with a spec file, pass the spec file as a command line argument. For example,

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 would be

D: setup "C:install.txt" /q /AcceptLicenses yes

if install.txt was located on the C: drive.

Related Links:
KnowledgeBase 4CJDP38M: Automating the Installation of National Instruments Software
KnowledgeBase 4CJDR18M: How Can I Determine the Type and Version of My National Instruments Installer?
KnowledgeBase 2LNEFGO9: Silent Installation of the LabVIEW Run-Time Engine
KnowledgeBase 368M270U: Creating a Silent Customized Installer for NI-DAQmx
KnowledgeBase 2HPDNSLD: Installing a LabVIEW Executable and LabVIEW Run-Time Engine Quietly
KnowledgeBase 4H38UPXU: Requesting Permissions from VLM during Mass Software Installations


Attachments:



Creating a Silent Install and Uninstall of LabVIEW.doc - Creating a Silent Install and Uninstall of LabVIEW.doc
filelist.xml - filelist.xml
image001.png - image001.png
image002.jpg - image002.jpg
image003.png - image003.png
install.jpg - install.jpguninstall.PNG - uninstall.PNGsilent_install.txt - silent_install.txt



Report Date: 05/09/2006
Last Updated: 06/11/2008
Document ID: 3X8BAP96

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit