10-25-2019 02:34 PM
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,
10-25-2019 03:00 PM
I tried this with NIPM 19.0 & 19.5 and it does work. Even running as admin did not help.
The only available action for ni-package-manager is Launch.
11-01-2019 11:19 AM
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
11-01-2019 12:54 PM
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
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
11-07-2019 03:27 PM
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.
11-25-2019 09:54 AM
Updating NIPM via the command line might be easier with the offline installer automation as shown in this thread.
05-19-2021 09:33 AM - edited 05-19-2021 09:43 AM
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
10-31-2024 06:46 PM - edited 10-31-2024 07:01 PM
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.
11-01-2024 10:25 AM - edited 11-01-2024 10:38 AM
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.
11-01-2024 02:18 PM - edited 11-01-2024 03:03 PM
@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]