From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI Package Manager (NIPM)

cancel
Showing results for 
Search instead for 
Did you mean: 

NI Package Builder Error

Solved!
Go to solution

Hi, I am trying to build an installer which would be able to install the LV2020 and TS 2020 run time packages, and then a series of other packages to deploy a system from scratch.

The NI package builder loos like a good fit for this scenario, and I have successfully built an installer to create the two platform dependencies. However, when I try to create a package that holds all the proprietary files, I get an error -16084 'An unexpected error occurred. Please contact NI for help resolving the issue' With the further info of 'Index was outside the bounds of the array'

 

I've tried minimising the package contents to just a single text file, and still get the same error. 

 

I tried running the package builder on my home pc, and it seemed to build the package without complaint. Does anyone have any insight on what this error might mean, and how to correct it?

 

Once I can get this error resolved, the package intentions would be to kick off an installation of SQL Express as well, plus ideally populate some table fields. Is this possible within the builder?

0 Kudos
Message 1 of 6
(3,177 Views)

Hi slaine13 - 

A) For the error you are describing, it is not something that we have seen or captured in our backlog.

 

The following information would be helpful to potentially narrow down the issue. Please share here or send to me directly the files associate with a single session of NIPB loading the solution and building the installer with error, and closing the solution:

  1. NIPB log file: %localappdata%\National Instruments\NI Package Builder\Logs\*.log
  2. NIPM log file: %localappdata%\National Instruments\NI Package Manager\Logs\NIPkgLogs\*.log
  3. NIPM error file: %localappdata%\National Instruments\NI Package Manager\Logs\errorlog.txt
  4. NIPB solution file that reproduces the issue

B) For the question about kicking off an installation of SQL Express and ideally populate some table fields. NIPB can be used to include 3rd party installers, by including the installer file in a package and possibly some scripts to execute to control the install or a script to just run after the install. The files can be installed to a temp location, and then run via post install custom executes. Others on this forum might be able to give you guidance or examples.

 

The online manual has the following related topics to using custom executes:

 

Note: There is a published bug specific to 20.6 that impacts the ability to pass parameters to custom execute, see NI Package Builder 20.6 Known Issues:

1461850

Custom executes error during installation when arguments contain quote characters

Package Builder incorrectly creates the instructions file for a package when the arguments for a custom execute contains quote (") characters. The custom execute fails when Package Manager executes the command because quote characters are incorrectly expanded as "&quote;".
For example, configuring a custom execute to call a batch script as shown below returns the error "The executable returned error '1' after running the custom execute command."
    Root: [System (32-bit)]
    Relative Executable Path: cmd.exe
    Arguments: /c ""%Program Files_64%\MyScriptFile.bat" "parameter 1" "parameter 2""

Workaround:

Downgrade to and build the package using Package Builder 20.5.

Reported Version:

NI Package Builder 20.6

Resolved Version:

N/A

Added:

Jul 13, 2021

Scott Richardson
0 Kudos
Message 2 of 6
(3,155 Views)

Hi Scott, 

 Thank you for your reply. I've attached the two log files you requested. These were from just trying to build a very simple text file into a package, with no other installers included.

 

Thanks

0 Kudos
Message 3 of 6
(3,134 Views)
Solution
Accepted by topic author slaine13

Slaine13, the NIPB log file includes an unexpected exception information about "DiscoveryExclusion.ReadCompanyProductMatchString" which leads me to believe that NIPB is trying and failing to read the "[Exclude Company Products]" section of the following file:

"C:\Users\scottri.NI\AppData\Local\National Instruments\NI Package Builder\DiscoveryExclusion.txt"

 

Have you made any edits to that file?

 

You should be able to rename the file and a restart of NIPB will generate the default settings. After you do this, try to build again and see if the problem no longer occurs. If it is fixed, I would be interested in the malformed file for me to attach to a work item to improve the code.

 

 

Scott Richardson
0 Kudos
Message 4 of 6
(3,125 Views)

Scott,

 Thanks for the information. I tried your suggestion of renaming the DiscoveryExclusion file, and retrying my simple example. It seemed to work fine. So I've tried a more complex build, and that seemed to created the installers (Need to test it in a VM to be sure)

So I hadn't edited the file you mentioned, but the newly corrected one was slightly different to the original. The only thing I may have done was to upgrade the version of the package builder from 20.1 to 20.6... 

The old file seemed to reference the older builder version, whereas the new file references 20.6.

I've included the text from both files below to illustrate my point.

 

Many thanks for your assistance, and the info on running additional installers

 

Original file

[Version]
20.1.0.1011

[Exclude Paths]
[Windows]\\WinSxS

[Include Paths]
[Documents]\\National Instruments
[User Desktop]
[My Documents]

[Exclude Company Products]
Microsoft, Microsoft.?.?.?.?.?.?.?Windows
Microsoft, NET Framework
Microsoft, Office
Microsoft, Microsoft.?.?.?.?.?.?.?Visual
.*\svn

[Include Company Products]

 

New File

[Version]
20.6.0.1227

[Exclude Paths]
[Windows]\\WinSxS
[TestStand Cfg]\\SeqEdit\\.*
[TestStand Public]\\Components\\Tools\\Deployment Utility\\.*

[Include Paths]
[Documents]\\National Instruments
[User Desktop]
[My Documents]

[Exclude Company Products]
Microsoft, Microsoft.?.?.?.?.?.?.?Windows
Microsoft, NET Framework
Microsoft, Office
Microsoft, Microsoft.?.?.?.?.?.?.?Visual
National Instruments, TestStand
National Instruments, LabWindows.CVI

[Include Company Products]

 

0 Kudos
Message 5 of 6
(3,117 Views)

Great, I will add the snippet to our internal bug, thanks!

Scott Richardson
0 Kudos
Message 6 of 6
(3,114 Views)