Solution
You can automate the installation of a single NI installer through the Windows Command Prompt. With a Command Prompt window open, change the working directory to the location containing the installation
setup.exe file by entering the command
cd <Path to the directory containing installation file>.
Once in the correct working directory, you can view the installer options at any time by entering the command
setup /h.
Supported Installation Modes:
- Silent: Lacks dialog box, GUI configurations, and a progress bar.
- Basic: Silent Installation with a progress bar.
- Basic Full: Lacks pre-install GUI, but shows a progress bar and post-install GUI elements such as the NI Activation Wizard.
- Customized: See the Customizing Installations section below.
To start one of these special modes, enter the corresponding command shown below:
- Silent: setup /q /AcceptLicenses yes
- Basic: setup /qb /AcceptLicenses yes
- Basic Full: setup /qf /AcceptLicenses yes
You may also choose to suppress or force rebooting your computer upon the completion of an installer in silent mode using the command line arguments listed below:
- Suppress final reboot: /r, /r:n
- Force final reboot: /r:f
Customizing Installation:National Instruments installers use a configuration file, called a
spec file, as a replacement for the configuration dialogue. This spec file contains information about the user, serial number, which features to install and not install, etc.
- Create the spec file:
The installer can be run in a spec file generation mode. In this mode, you can enter in user information, the serial number, and select each feature that you would like to have installed or not installed. You can also leave fields to a default value. You can run the installer in spec file generation mode using the following command:
setup /generatespecfile <spec file name>.
The installation dialog will appear. Instructions on the fields in each dialog exist at the bottom of the user interface. Once you walk through all of the dialogues, a spec file will be created which you can use to install the software silently.
- Running the installer with the spec file:
The installer can be run with the spec file by using the following command:
setup /applyspecfile <spec file name> /q /AcceptLicenses yes
To see a list of available options in the command prompt, run setup.exe -help