Editing National Instruments Spec File

Updated Nov 11, 2017

Reported In

Software

  • LabVIEW Base
  • LabVIEW Full

Issue Details

I want to change the behavior of National Instruments installers, which means I need to edit the spec files the installers use. How do I manually edit the spec files?

Solution

Most older versions of National Instruments installers have a default spec file that you can use as a template to modify how the install process behaves. If the default spec file does exist, it is usually found in a support folders of the installer, such as suppfiles or supportfiles with a name similar to productName.spectemplate_spec.txt or sample.spec. For LabVIEW, the default spec file is called silent_install.txt and it is located in the bin folder of the installer. However, the default spec file does not exist for LabVIEW 2009 or later.

If the spec file does not exist, you can use the template spec file attached at the end of this article. NI installers can also generate spec files, which can also be used as templates. Refer to Automating the Installation of a Single Installer for more information on generating and using spec files.

Spec files generally have six sections, they are:
  • [UserInfo] describes information in the User Information dialog as shown below:
  • [Features] configures the Features dialog shown below, and determines which feature will be installed.


The valid feature states are LocalAbsentNoChange and DefaultDefault is equivalent to not listing the feature in the spec file. The feature follow its default behavior based on level, dependencies, etc. The following table summarizes the LocalAbsent and NoChange feature states:

 

StateIf the feature is already installed:If the feature is not installed:
LocalLeave it installedInstall (on the local hard drive)
AbsentUninstallDo not install
NoChangeLeave it installedDo not install

 

If there is a particular feature that you need to add to your spec file and you cannot find the feature name, try generating a spec file from the installer first or contact NI Technical Support.
  • [Directories] determines the primary directories in the Destination Directory dialog page shown below:


You can also specify where each feature will be installed in the [Directories] section. For example, if you want to install LabVIEW 2012 in a folder named LV_2012_Pro, you would have the following command in the directories section:

NILV.LV2012.001 = C:\Program Files (x86)\National Instruments\LV_2012_Pro\
  • [Settings] allows you to automatically move on from the welcome dialog page shown below:
  • [DisableDialogs] determines dialog windows that should be hidden from the user, such as the User Info dialog window.
  • [SerialNumberDialog] automatically enters the serial numbers in the Serial Numbers dialog shown below:
    Not all six sections need to be present in the spec file. Installers will follow its default behavior if a section is not specified in the spec file. With the exception of the [DisableDialogs]  section, all other sections follow the syntax below:

    [Category]
    [Property1]=[Property1Value]
    [Property2]=[Property2Value]

    To set a property to true, use character 1. Comments in spec files start with a semicolon. For the [DisableDialogs] section, simply delete the semicolon to disable a specific dialog. 

    Additional Information

    National Instruments installers use a configuration filed called a spec file. With a spec file, you can modify the default settings and behavior of installers, such as which features in the installation should be enabled or disabled. This is a useful tool that facilitates automated installation.

    Not all six sections need to be present in the spec file. Installers will follow its default behavior if a section is not specified in the spec file. With the exception of the [DisableDialogs]  section, all other sections follow the syntax below:

    [Category]
    [Property1]=[Property1Value]
    [Property2]=[Property2Value]

    To set a property to true, use character 1. Comments in spec files start with a semicolon. For the [DisableDialogs] section, simply delete the semicolon to disable a specific dialog. 

    WAS THIS ARTICLE HELPFUL?

    Not Helpful