NI Package Manager (NIPM)

cancel
Showing results for 
Search instead for 
Did you mean: 

how to upgrade package manager through command line

Hi Bill,

 

Try "nipkg upgrade --accept-eulas -y" to silently upgrade everything.  "nipkg upgrade --accept-eulas -y ni-package-manager" will upgrade just NIPM.

 

Thanks,

Michael B.
Product Support Engineer
National Instruments
Message 11 of 24
(3,403 Views)

I tried this with NIPM 19.0 & 19.5 and it does work. Even running as admin did not help.

NIPM 19.0 Update Error.png

NIPM 19.5 Update Error.png

The only available action for ni-package-manager is Launch.

__________________________________
Bill Eisenhower
Certified LabVIEW & TestStand Developer
0 Kudos
Message 12 of 24
(3,395 Views)

I was able to use the following command line to upgrade NIPM 19.0 to 19.5:

nipkg upgrade --force-locked --accept-eulas --assume-yes ni-package-manager

 

Note: If you might be in a situation where the target computer has NIPM 19.0 installed and no one has launched NIPM since NIPM 19.5 became available, then you should run nipkg update from the command-line first, so that NIPM can "refresh its feeds" in order to see the latest updates (e.g. NIPM 19.5) before running the above command.

 

Allen Hsu

National Instruments

Message 13 of 24
(3,345 Views)

The given command does work for 19.0.0 to update to 19.5.1. However it does not appear to work for 19.5.0 to get to 19.5.1

Working NIPM 19.0.0 upgrade to 19.5.1Working NIPM 19.0.0 upgrade to 19.5.1

Failing 19.5.0 upgradeFailing 19.5.0 upgrade

However I was able to work out a way via a series of commands to get 19.5.0 to be updated to 19.5.1. I hope this can be simplified to the update and upgrade commands like 19.0->19.5.1. Having the single consistent self-updating command would make it easy for updating older deployments.

 

NIPM 19.5.0 to 19.5.1 upgrade script

nipkg update
nipkg upgrade --accept-eulas --assume-yes ni-package-manager-released-feed
nipkg update
nipkg upgrade --accept-eulas --assume-yes ni-package-manager-upgrader
nipkg upgrade --accept-eulas --assume-yes system-windows-x64
nipkg upgrade --accept-eulas --assume-yes ni-package-manager-deployment-support
nipkg upgrade --force-locked --accept-eulas --assume-yes ni-package-manager
__________________________________
Bill Eisenhower
Certified LabVIEW & TestStand Developer
Message 14 of 24
(3,333 Views)

Now that NIPM 19.6 is available, I tried the to upgrade 19.5.1 via the command line to 19.6. The update and upgrade combination does not work. However my 19.5.0->19.5.1 procedure did work.

__________________________________
Bill Eisenhower
Certified LabVIEW & TestStand Developer
0 Kudos
Message 15 of 24
(3,297 Views)

Updating NIPM via the command line might be easier with the offline installer automation as shown in this thread.

__________________________________
Bill Eisenhower
Certified LabVIEW & TestStand Developer
0 Kudos
Message 16 of 24
(3,253 Views)

I'm confused, so how can I upgrade NIPM using command line? I tried different options suggested in this thread and non of them working.

ni-package-manager is not installed or is not upgradable. No operation will be performed.

I saw that with NIPM is installed also

ni-package-manager-upgrader 20.7.1.49158-0+f6 windows_x64 Application used to upgrade the package manager.

Can I use it somehow from command line to upgrade NIPM?  

 

EDIT:

Nevermind, I figured it out 😅

C:\Program Files\National Instruments\NI Package Manager\Updater>Install.exe --passive  

 

Michał Bieńkowski
CLA, CTA, CPI

  1. Did someone devote their time to help solve your problem? Appreciate it and give kudos.
  2. Problem solved? Accept as a solution so that others can find it faster in the future.
  3. Contribute to the development of TestStand by voting on the TestStand Idea Exchange.
Message 17 of 24
(2,888 Views)
Install.exe --passive  

This returns immediately "detached" from the installation. I need my script to wait until the install finishes because what I am actually trying to do is install a package I created without it failing due to outdated NIPM.

 

I run these steps in Powershell:

 

$nipkg_exe = "C:\Program Files\National Instruments\NI Package Manager\nipkg.exe"
cmd /c $nipkg_exe update ni-package-manager ni-package-manager-upgrader ni-package-manager-released-feed system-windows-x64 ni-package-manager-deployment-support
cmd /c $nipkg_exe upgrade --force-locked --accept-eulas --assume-yes ni-package-manager ni-package-manager-upgrader ni-package-manager-released-feed system-windows-x64 ni-package-manager-deployment-support

 

 The output of the upgrade command is "Packages are not installed or are not upgradable. No operation will be performed."

 

Then later on in the script my install fails:

Error -125081: Package '<package name>' requires a newer version of Package Manager. To update, navigate to the Package Manager UPDATES tab and update the NI Package Manager package.

Which can be resolved manually but I am literally writing this complicated script because I don't want to do this incredibly basic automation.

 

So does anyone have a script to actually update NIPM on Windows and return a success or failure?

 

Edit: ran this in cmd "C:\Program Files\National Instruments\NI Package Manager\Updater>start /wait Install.exe --accept-eulas --prevent-reboot", no quiet flag so I can see the popup, it said no upgrade to be performed. Then I MANUALLY opened NIPM, it had a progress bar stating updating NIPM updater, and showed upgrade available. I still don't know how to make NIPM realize it needs an upgrade without looking at it with my cold dead eyes.

0 Kudos
Message 18 of 24
(392 Views)

I would try excluding the upgrader package, not sure that needs to be installed. You could consider the install order and put in dependency order: system-windows-x64 ni-msiproperties eula-ms-dotnet-4.8 ni-msdotnet4x ni-package-manager-deployment-support ni-package-manager

 

I recommend using the --verbose flag to maybe get more information.

Scott Richardson
https://testeract.com
0 Kudos
Message 19 of 24
(356 Views)

@Scott_Richardson wrote:

I would try excluding the upgrader package, not sure that needs to be installed. You could consider the install order and put in dependency order: system-windows-x64 ni-msiproperties eula-ms-dotnet-4.8 ni-msdotnet4x ni-package-manager-deployment-support ni-package-manager

 

I recommend using the --verbose flag to maybe get more information.


Thanks for helping!

 

Same result:

$nipkg_exe = "C:\Program Files\National Instruments\NI Package Manager\nipkg.exe"
PS C:\Users\ci-worker> cmd /c $nipkg_exe update system-windows-x64 ni-msiproperties eula-ms-dotnet-4.8 ni-msdotnet4x ni-package-manager-deployment-support ni-package-manager
PS C:\Users\ci-worker> cmd /c $nipkg_exe upgrade system-windows-x64 ni-msiproperties eula-ms-dotnet-4.8 ni-msdotnet4x ni-package-manager-deployment-support ni-package-manager
Packages are not installed or are not upgradable. No operation will be performed.

PS C:\Users\ci-worker> cmd /c $nipkg_exe upgrade system-windows-x64 ni-msiproperties eula-ms-dotnet-4.8 ni-msdotnet4x ni-package-manager-deployment-support ni-package-manager --verbose
Packages are not installed or are not upgradable. No operation will be performed.

 Open NIPM GUI -> "updating updater" -> update available

 

"Fortunately" I have dozens or hundreds of systems to try this on.

 

edit: this is the output of the same command after opening NIPM gui

 

PS C:\Windows\system32> cmd /c $nipkg_exe upgrade system-windows-x64 ni-msiproperties eula-ms-dotnet-4.8 ni-msdotnet4x ni-package-manager-deployment-support ni-package-manager --verbose
eula-ms-dotnet-4.8 is already the newest version.
ni-msdotnet4x is already the newest version.
ni-package-manager is already the newest version.
The following packages will be upgraded:
ni-msiproperties (23.8.0.49254-0+f102) to ni-msiproperties (24.8.0.49248-0+f96)
ni-package-manager-deployment-support (23.8.0.49300-0+f148) to ni-package-manager-deployment-support (24.8.0.49281-0+f129)
system-windows-x64 (23.8.0.49300-0+f148) to system-windows-x64 (24.8.0.49281-0+f129)
Installing 0 package(s); Upgrading 3 package(s); Removing 0 package(s); Downgrading 0 package(s)
Need to get 9.98 MB of archives.
After this operation, 0 bytes of additional disk space will be used.
Do you want to continue? [y/n]

 

0 Kudos
Message 20 of 24
(310 Views)