Why Does NI Package Manager Freeze At Custom Executes Post Install?

Updated Aug 10, 2023

Reported In

Software

  • NI Package Builder
  • Package Manager

Issue Details

I am trying to have my NI Package Manger (NIPM) to install a package to custom execute post-install (with Wait To Complete enabled) command with a batch file included in the NI Package Builder so that the NIPM will execute the batch file after installing the first package. The batch file content have the NIPM to install another package.

However, when I try to run the package built, the NIPM will forever stuck at the first installation without going into the batch file. Why is this happening?

Solution

NI Package Manager, including nipkg.exe, does not support running an installation related transaction while another one is running. If nipkg.exe is called in such as case, it may block or it could error in some cases, as this is not a workflow that we generally support. By not waiting for the completion, the batch file is likely blocked until the first installation completes, and then the batch file likely completes the nipkg.exe command and then completes. 

Technically the customer could just not wait for completion, but if the batch files fails, the error will be ignored unless the batch file displays something.

Additional Information

Using Pre-Install in Custom Executes could act as a workaround depending on user's requirement.