Automating an Installer

Automate the unattended or quiet installation of an online installer, offline installer, or Package Manager using the command line interface (CLI).

To make the installation process non-interactive, include the --passive option at the command prompt. Unattended mode is not fully quiet. Status dialogs appear during the installation process, but you do not need to interact with them. You can use this mode when installing from a script or the command line.

To make the installation process fully quiet, include the --quiet option at the command prompt. This option prevents Package Manager from displaying visible dialogs or taskbar icons during installation.
Note This process supports installers built with Package Manager 20.7 (released in April 2021) and later. For more information on how to automate Package Manager installation for previous versions, see the article Automating the Unattended Installation of NI Package Manager.

An online installer is a lightweight executable containing no packages in itself, but installs a product by downloading the necessary packages from the internet. An offline installer contains the complete set of packages needed for the product, which are bundled into a one-time download. Since offline installers contain the complete contents of software, it typically takes longer to download.

Complete the following steps to automate the unattended installation of an online installer, offline installer, or Package Manager.

  1. Navigate to ni.com/downloads and search for the product you want to install. If you are installing Package Manager, navigate to the Package Manager download page.
  2. Select the product version, edition, and driver software you need, if applicable.
  3. Determine the installer type you need and complete the corresponding steps to download and run the installer.

Selecting an Online Installer Type

Installers of this type always download as an .exe and are typically under 10MB. This option is not available for all products,

  1. Click Download if an online installer is available.
  2. Ensure the installer is an executable.
  3. Run Command Prompt as an administrator and pass one of the following commands and options:
    • start "" /wait "path of install.exe" --passive --accept-eulas --prevent-reboot
    • For quiet installation, use the --quiet option instead of the --passive option.
      start "" /wait "path of install.exe" --quiet --accept-eulas --prevent-reboot

    The following options are not required when using the --passive or --quiet options:

    • To make the installation process skip any license activation, include the --prevent-activation option in the command prompt.
      start "" /wait "path of install.exe" --prevent-activation
      Note License activation must still be performed to use any product requiring activation.
    • To prevent the installation process from displaying a completion prompt, include the --hide-completion option at the command prompt.
      start "" /wait "path of install.exe" --hide-completion
    • To install NI Package Manager passively but require user interaction for the rest of the installation, include the --autoinstall-nipkg option in the command prompt.
      start "" /wait "path of install.exe" --autoinstall-nipkg

Selecting an Offline Installer Type

Installers of this type download as an .iso file. You must either mount the .iso file or extract all of the files to a local directory before launching the installer. The NI Package Manager offline installer downloads as an .exe file and you can use the same command-line when launching that executable.

  1. Download an offline installer in one of the following ways.
    • Click Individual Offline Installers if available.
      1. Select one of the offline installer options.
        Note Product versions with a higher value in the third field of a version include patch fixes. For example: 23.0.1.
      2. Click Download.
      3. Wait until the installer finishes downloading before completing the next step.
    • Click the title of the latest version of the product you are installing.
      1. Click the download link to download your offline installer.
      2. Proceed once the installer has finished downloading.
  2. Run Command Prompt as an administrator and change to the directory in which you downloaded your installer using the cd command.
    For example:
    cd "C:\Users\lvadmin\downloads"
  3. Pass one of the following commands and arguments:
    • start "" /wait "path of install.exe" --passive --accept-eulas --prevent-reboot
    • For quiet installation, use the --quiet option instead of the --passive option.
      start "" /wait "path of install.exe" --quiet --accept-eulas --prevent-reboot

    The following options are not required when using the --passive or --quiet options:

    • To make the installation process skip any license activation, include the --prevent-activation option in the command prompt.
      start "" /wait "path of install.exe" --prevent-activation
      Note License activation must still be performed to use any product requiring activation.
    • To prevent the installation process from displaying a completion prompt, include the --hide-completion option at the command prompt.
      start "" /wait "path of install.exe" --hide-completion
    • To install NI Package Manager passively but require user interaction for the rest of the installation, include the --autoinstall-nipkg option in the command prompt.
      start "" /wait "path of install.exe" --autoinstall-nipkg

Verifying the Installer

Execute the following command to verify the installation was successful: echo %errorlevel%.
Note
  • A return code of 0 indicates that you successfully installed the software.
  • A return code of -125071 indicates that you successfully installed the software but are required to reboot your machine.
  • A return code of -126300 indicates that you only installed Package Manager and must reboot your machine and then rerun the installer to complete the software installation.

Troubleshooting

You can obtain more information about options that the installer supports by running the following command and options from a Command Prompt by running the following:
start "" "path to install.exe" /?