12-18-2020 05:55 PM
I'm trying to automate the installation/update for my Labview suite install. I've got the installation part down fine, but running into issues when trying to use nipkg to run the update process. Is there a proper method to build the package list automatically rather than adding each one to the feed manually? For example, when I launch the GUI it does some work to build the nipkg.ini file and populates the packages that need updated. When I run "nipkg.exe update" it doesn't build the package list automatically.
I'm basically looking for a way to silently update everything that's installed without using the GUI.
12-21-2020 09:33 AM
The update command for nipkg.exe just refreshes the local package listing cache from all the subscribed feeds. You want nipkg.exe upgrade --yes --accept-eulas as that will update/upgrade all available packages. You should call nipkg.exe update first to get the last of all packages, then nipkg.exe upgrade. nipkg.exe help upgrade has more details.
12-21-2020 10:00 AM
That sounds like what I've been doing. When I run nipkg update it tells me it's updating the cache but doesn't list any packages.
However, if I open the GUI (I'm doing this on a different computer with the same install) it tells me there are at least 6 updates available. On that same machine, after opening the GUI, I can go back to the CLI and when I run nipkg update it shows me all kinds of feeds updating.
After re-thinking about this I guess my problem is how can I automatically populate that feed list using the command line, or is there an ini/config file that can be copied to multiple machines so the CLI can be run?
12-21-2020 10:09 AM
Interesting the feeds are not subscribed when you installed the products. Just to clarify, if you open the NIPM GUI then retry the update & upgrade, you see the additional feeds/updates? If so, I am guessing you may need to open the NIPM GUI at least once. There always seems to be some first launch items for NI products. Too bad there does not appear to be a close NIPM GUI command like TestStand's CLI, so you can basically script an open and close for it to finish its setup/copying of files.
12-21-2020 11:04 AM
That's correct. Once I open the GUI the feed list is populated when I run the CLI.
I did find most of that information seems to be written to nipkg.ini located in C:\ProgramData\National Instruments\NI Package Manager\Settings
If I copy that file to a different machine that hasn't ran the GUI yet I AM able to run the update/upgrade through CLI. However I'm not sure if that's the 'proper' way to perform the update process. The entries in the ini file seem pretty version specific so I don't know if they'll update automatically once newer updates come out.