Table Of Contents

Automating an Installer

Last Modified: February 5, 2020

Automate the unattended installation of an online installer, offline installer, or NI Package Manager using the command line interface (CLI). Unattended mode is not fully silent. 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.

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.
spd-note-note
Note  

This process supports NI Package Manager 19.6 and later. For more information on how to automate NI Package Manager installation for previous versions, see this KnowledgeBase article.

  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.
    Installer Type Steps to Download and Install
    Online
    spd-note-note
    Note  
    • Installers of this type always download as an .exe and are typically under 10MB.
    • There are products that do not offer an online installer option.
    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 the following command and flags.
      start /wait <name of installer.exe> --passive --accept-eulas --prevent-reboot
    Offline
    spd-note-note
    Note  

    Installers of this type can download as a larger .exe, .iso, or .zip file.

    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.
          spd-note-note
          Note  

          The higher version is a patch.

        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 the following commands and arguments.
      start /wait Install.exe --passive --accept-eulas --prevent-reboot
    Package Manager
    1. Download either the latest version or a specific version of Package Manager.
      • Click Download to download an online installer that always installs the latest version of Package Manager.
      • Click Individual Offline Installers to download an offline installer for a specific version of Package Manager.
    2. Run Command Prompt as an administrator and pass the following command and flags.
      start /wait <name of installer>.exe --passive --accept-eulas --prevent-reboot
  4. Pass the following command to verify the installation was successful: echo %errorlevel%.
    spd-note-note
    Note  

    A return code of 0 indicates that you successfully installed the package, and a return code of -125071 indicates that you installed the package but are required to reboot your machine. For all other return codes, visit ni.com/support.

Troubleshooting

If the steps above fail, you may be using a format of the installer that is no longer supported. Go to ni.com/downloads to find the updated format of the installer. Download the installer again and retry the steps above.


Recently Viewed Topics