NI Package Management

cancel
Showing results for 
Search instead for 
Did you mean: 

Build a package that installs a 3rd party (non-NI) installer

This document is part of the NI Package Management Portal.

 

Build a package that installs a 3rd party (non-NI) installer

 

Option 1: Create a File Package Using NI Package Builder

You can use the following steps to create a file package that places (i.e. installs) the non-NI installer files on the target computer… and uses a post-install step that runs the non-NI installer.

  1. Install NI Package Builder (free utility)
  2. Open NI Package Builder and create a package.
  3. Add the 3rd party installer file(s) to the Inputs pane on the left.
  4. Add the 3rd party installer file(s) to the destination folder (e.g. Temp) for the package in the middle pane.
    Note: Make sure you are using NI Package Builder 19.6 or later.
    NI Package Builder 19.5 and earlier has a bug, where using the [Temp] folder will not work correctly for this workflow.  If you are using NIPB 19.5, please use a destination folder like [Documents]\My Installer instead of [Temp].  This also applies to the post-install step in steps #6 and #7.

  5. In the Packages pane on the upper-right, select your package.  Then define all the package properties (e.g. name, version, category, maintainer, etc)
  6. In the Properties section of the Packages pane on the bottom-right, go to the Custom executes row and click the button.
    Use this dialog to make sure that installing this package will trigger running the 3rd party installer EXE with a "Post All Install" step, as shown in the 2nd screenshot below.
    Use this dialog to also make that uninstalling this package will trigger running the 3rd party uninstaller with a "Pre Uninstall" step, as shown in the 3rd screenshot below.
  7. Your NI Package Builder solution should now look like the 1st screenshot below (example of wrapping the Git installer).
  8. Build the package by clicking the Build All Packages button in the Packages pane toolbar on the top-right.

Completed NI Package Builder solution

Note: For NI Package Builder 19.5 or earlier, please use a destination folder like [Documents]\My Installer instead of [Temp].

3rd party installer (Git) example - NIPB.png

 

Dialog to configure "Post All Install" behavior

Note: The 3rd party Git installer will install silently if you pass a "/SILENT" argument.  Enabling the Wait to Complete checkbox cause the NIPM installation of this package to wait until the 3rd party installer completes before this package's installation completes.

Note: Use a Root folder that contains the 3rd party installer.
For NI Package Builder 19.5 and earlier, this folder should be something like [Documents]\My Installer instead of [Temp].

3rd party installer (Git) example - post-all-install.png

 

Dialog to configure "Pre Uninstall" behavior

3rd party installer (Git) example - pre-uninstall.png

 

Example code: Explore the files for this example NIPB solution, which is hosted on this GitHub page: 3rd party installer wrapper (Git client installer)

 

Option 2: Create a WinInst Package

If the non-NI installer (e.g. non-NI drivers) contains .msi files, you can follow these instructions to create a “WinInst” package:

  1. First, assemble the directory structure and files for a WinInst Package.  To do this, you will need to create a control file and an instructions XML file for WinInst packages.
  2. Build a package from the assembled directory using the the Command Line Interface.

Example code: Explore an example that wraps a Python 2.7 msi installer on the this GitHub page: 3rd party MSI installer wrapper (Python 2.7 MSI)

 

Option 3: Create a File Package By Manually Assembling the Package

If the non-NI installer does not have .msi files, then you could use the following documentation to create a file package instead that places (i.e. installs) the non-NI installer files on the target computer… and uses the instructions XML file to execute a post-install step that runs the non-NI installer.

  1. First, assemble the directory structure and files for a File Package.  To do this, you will need to:
    1. Create a control file.
    2. Define where the package will put your files (e.g. non-NI installer files) on the target computer.
    3. Create an instructions XML file for File packages that uses a post-install step to run the installer.
      (e.g. <customExecute step="install" schedule="post" root="ProgramData" exeName="executable.exe"/>)
  2. Build a package from the assembled directory using the the Command Line Interface.

 

Contributors