07-26-2021 03:04 AM
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
Solved! Go to Solution.
07-26-2021 03:54 AM
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...)
07-26-2021 04:46 AM
You're right, I was ommiting the fact that I'd like to avoid PowerShell-magic 😉
Thanks, for your suggestions 🙂
07-26-2021 04:50 AM - edited 07-26-2021 05:17 AM
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.
07-26-2021 06:18 AM
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!
07-26-2021 09:57 AM
Also see this post for something similar:
https://forums.ni.com/t5/NI-Package-Manager-NIPM/NI-Package-Manager-on-offline-machine-stuck-on-load...
08-09-2021 06:42 AM
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
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?
08-10-2021 10:06 AM
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".
05-05-2023 09:51 AM
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
05-12-2023 06:05 PM
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.