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.
- Install NI Package Builder (free utility)
- Open NI Package Builder and create a package.
- Add the 3rd party installer file(s) to the Inputs pane on the left.
- 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.
- In the Packages pane on the upper-right, select your package. Then define all the package properties (e.g. name, version, category, maintainer, etc)
- 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.
- Your NI Package Builder solution should now look like the 1st screenshot below (example of wrapping the Git installer).
- 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].
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].
Dialog to configure "Pre Uninstall" behavior
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:
- 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.
- 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.
- First, assemble the directory structure and files for a File Package. To do this, you will need to:
- Create a control file.
- Define where the package will put your files (e.g. non-NI installer files) on the target computer.
- 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"/>)
- Build a package from the assembled directory using the the Command Line Interface.