NI Package Manager (NIPM)

cancel
Showing results for 
Search instead for 
Did you mean: 

Where does NI Package Manager store its' feeds and attributes?

Solved!
Go to solution

Hi everyone,

 

I came back to my side project: company wide rollout of NI development software using the NI Package Manager.

 

My use case: I want to roll out a NIPM configuration to my client computers, with my own feeds only, since all software has to be installed from a trusted location.

 

For testing, I wanted to remove all the feeds which come with the standard NI Package Manager installation. Or at least temporarily remove them.

 

Using the GUI, I can remove feeds one by one (tedious) and all attributes for the according feed are removed from the NIPM configuration (validated with nipkg config-get). When setting the enabled-attribute  for the feed to false, it will still show up in the GUI, even after multiple refreshes.

 

So the question is: is there a more convenient way of registering / unregistering feeds? Like exporting/ modifying/ importing a configuraion file?

 

Cheers

Oli

 

 

0 Kudos
Message 1 of 11
(5,238 Views)

You may already have discarded this possibility, but I think it isn't excluded by your description, so...

I suspect you can remove all the feeds you don't want (i.e. all the feeds?) using a combination of `feed-list` and `feed-remove` and the CLI for nipkg.exe.

 

You'll probably need some command-line text parsing, I got this "working" in Powershell...

nipkg feed-list | ForEach-Object { $n=$_.Split()[0]; if (-not [string]::IsNullOrEmpty($n)) { "$n" } }

 

This outputs the names of all feeds that are configured.
I expect (although I don't want to try on a real system right now... 😉 ) that you could add a bit to the end of this, something like (untested):

nipkg feed-list | ForEach-Object { $n=$_.Split()[0]; if (-not [string]::IsNullOrEmpty($n)) { nipkg feed-remove "$n" } }

 

Of course you could also do filtering in the if condition, or probably many other places (I'm not a Powershell expert...)


GCentral
Message 2 of 11
(5,216 Views)

You're right, I was ommiting the fact that I'd like to avoid PowerShell-magic 😉

 

Thanks, for your suggestions 🙂

0 Kudos
Message 3 of 11
(5,207 Views)
Solution
Accepted by topic author Oli_Wachno

I can draft it in Bash or CMD if you prefer? 😉 

More seriously, I think you might have some luck with your equivalent of
C:\Users\Christian\AppData\Local\National Instruments\NI Package Manager\nipkg.ini

Edit:
That seems to control some extra feeds, but the system feeds are added I think by the file:
C:\Program Files\National Instruments\NI Package Manager\Deployment\nipkg.ini

Running the Powershell to remove them did remove most cases (some wiggling required for those with spaces in the name) but they readded when I launched NIPM, so I think changing the ini above might be required.


GCentral
0 Kudos
Message 4 of 11
(5,204 Views)

Thanks for the hint!

 

I have indeed already looked into the ini, but expected to find some other information.

 

I'll start tinkering there

 

I owe you one!

 

 

0 Kudos
Message 5 of 11
(5,195 Views)
Solution
Accepted by topic author Oli_Wachno
Message 6 of 11
(5,185 Views)

After enjoying the opportunity to try some things

For the sake of documentation of who ever may read this 😉

 

.\nipkg feed-list | ForEach-Object { $n=$_.Split()[0]; if (-not [string]::IsNullOrEmpty($n)) { .\nipkg feed-remove "$n" } }

 

works, but you must not forget .\ before nipk.exe

 

Resulting in

 

Oli_Wachno_0-1628508847485.png

 

After checking ni-package-manager-released.ini, my understanding is that NI Package Manager blocks the removal of its' own feed, which I regard to be a convenient safety feature.

 

The remaining errors basically state, that the feeds were not existing. Maybe these have been recursive calls to dependencies, which already had been removed.

 

Yet, I have been surprised, that invoking nikg.exe feed-list still returns a bunch of feeds. I suspect that these belong to the software packages already installed on my computer.

 

Can anyone confirm the statements above?

0 Kudos
Message 7 of 11
(5,003 Views)

I'm not sure about the errors, but regarding feeds still being registered... Note that the NIPM GUI has logic to automatically register feeds for top level products by default, so if you removed all of the feeds, then launched the main NIPM GUI again, many of them would return. You can disable this automatic feed registration in the GUI by going to the Gear in the upper right corner, General, and uncheck "Show the BROWSE Products feed and auto-register product feeds".

Message 8 of 11
(4,986 Views)

Hello, 

A query related to the topic:

Can I somehow configure NIPM storing/loading its registered Feeds (nipkg.ini) in "C:\Users\Public\..." rather than in LocalApp Data folder for the particular Admin user who launched NIPM?

Eg. C:\Users\Christian\AppData\Local\National Instruments\NI Package Manager\nipkg.ini

 

I have developed a tool which checks which feeds are registered in the NIPM and if multiple Admin users register feeds in NIPM then my tool wouldn't know which users nipkg.ini file to use.

 

Any hints would be appreciated.

Thanks,

Rahul

Certified LabVIEW Developer

0 Kudos
Message 9 of 11
(2,604 Views)

If you use the NIPM CLI (nipkg.exe) to add the feed, you can specify a "--system" flag to add the feed to the config for all users.

WesW_0-1683932674076.png

 

 

0 Kudos
Message 10 of 11
(2,560 Views)