NI Package Manager (NIPM)

cancel
Showing results for 
Search instead for 
Did you mean: 

How to deploy installed packages with nipkg.exe

Solved!
Go to solution

One of our uni's instructors have installed some NI software on a computer with NI Package Manager (GUI). He has not picked the packets one by one but clicked and installed NI Software Platform Bundle (version Fall 2021) with some selections. Now, my job would be deploy the installed software bundle to some other computers. I can get the list of installed packages with "nipkg.exe list-installed" but how do I get a list of all the "mother packages" which would install all the dependency packages also? I guess the way it would NOT work is to get ALL the package names from the nipkg's list and install them from a package cache feed e.g. with Powershell script - or would it?

 

I've tried to build an installer with NI Package Builder, but the problem is again that I don't know which packages to include. If I use the "Add Packages..." function and choose it to show all installed packages, the list is very long and it would take ages to click all the checkboxes. (I haven't found a way to select and enable them all with one click). And if I finally get them all enabled, should I also enable the "always install" and/or "include recommended and suggested packages" in all the packages?

 

0 Kudos
Message 1 of 6
(4,267 Views)

What you are asking is to find all installed visible packages that do not have any other installed package with a dependency on it. There is no built in way to determine this. 

 

Technically you could execute and capture the output of the command "nipkg.exe info-installed" and then programmatically process the output by putting the contents into a list that includes items that include the package, version, uservisible, & depends attributes, and then process the list as mentioned above.

Scott Richardson
https://testeract.com
0 Kudos
Message 2 of 6
(4,217 Views)

Thank you very much for your reply!

 

So, it would not be enough to extract the names of the installed packages from the list generated by "nipkg.exe list-installed", add every package to a feed and install them one by one with "nipkg.exe install"? The script sounds quite complicated and time consuming to make. First I'd also need to study to understand more about the dependencies and the other attributes.

 

Currently I am also testing building an installer (containing all the installed visible packages) with NI Package Builder and then using the installer to install the software. So far the installer seems to work but the problem is the amount of time its taking. First the installer seems to add the packages to feed(s) which takes several hours, after that it handles the license agreements and finally starts installing. I hope the software works fine after the installations have finished.

0 Kudos
Message 3 of 6
(4,201 Views)
Solution
Accepted by topic author nwallentin

If they installed most of the software in NI Software Platform Bundle, then I would expect the visible package list to be quite large and yes it would take a long time to install. for NI Package Manager 2023 Q1, we did make an update that can improve installation time by potentially 15-30%, so not sure if you want to install that version before building the installer. Obviously just targeting the specific software that is needed on the system will make the installer smaller.

 

Installing one package at a time from a feed will not perform well, there is too much overhead to initiate each installation transaction. I think if you include visible packages that your system needs, that should be close to what you want.

Scott Richardson
https://testeract.com
0 Kudos
Message 4 of 6
(4,186 Views)

Thank you so much for your help! I think this problem is now solved.

 

I tried building an installer including only the installed visible packages and now the installer seems to install everything that is needed. I was using the NI Package Builder GUI and had to choose every packet one buy one from the Installed Packages list. This was a bit time/nerve consuming (~150 times space + arrow down) but could be done. I'm sure using a script to pick the visible packages from "nipkg.exe info-installed" list and using a command-line to build the installer would be faster. I just need to write the script first.

I've been using the latest version of NI Package Manager.

0 Kudos
Message 5 of 6
(4,120 Views)
Thanks for sharing that you are unblocked.
Scott Richardson
https://testeract.com
0 Kudos
Message 6 of 6
(4,082 Views)