10-20-2021 12:13 PM
Hey everyone, I'm trying mimic the functionality of clicking "Install" in the GUI of NIPM for any specific product via the command line. For example, after installing NI Package Manager, how would I install NI-DAQmx 18.5 64bit?
I'm new to this and I'm trying to automate software installation.
Solved! Go to Solution.
10-22-2021 10:07 AM
This is how I did it:
1) Install NI Package Manager:
start /wait NIPackageManager21.3.0_online.exe --quiet --accept-eulas --prevent-reboot
2) Launch NI Package Manager and browse to the title\version\bitness you want. Click Install and leave the "wizard" open.
3) Get the name and URI of the feed that NI Package Manager temporary added for that package
cd "C:\Program Files\National Instruments\NI Package Manager\"
nipkg feed-list
4) Search for the package name, version, and bitness
nipkg list | findstr "runtime"
5) Build your script. (You can close NIPM)
cd "C:\Program Files\National Instruments\NI Package Manager"
:: Add feed from step 3. Make sure your name doesn't have any spaces.
nipkg feed-add --name=ni-labview-2019-runtime-engine-x86-2019-released https://download.ni.com/support/nipkg/products/ni-l/ni-labview-2019-runtime-engine-x86/19.0/released
nipkg feed-add --name=ni-labview-2019-runtime-engine-x86-2019-released-critical https://download.ni.com/support/nipkg/products/ni-l/ni-labview-2019-runtime-engine-x86/19.0/released-critical
:: Get list of packages from feed.
nipkg.exe update
:: Install the package name, bitness and version from step 4. Allow and accept EULAs. Syntax is tricky.
nipkg install ni-labview-2019-runtime-engine-x86:windows_all=19.0.2.49152-0+f0 -y --accept-eulas
10-22-2021 12:47 PM
You can also use NI Package Builder to build a Package Installer that can be call without user interaction. The Package Installers will install/update NIPM if needed and then install your selected packages. This allows you to keep a local copy of all the packages so you do not need an internet connection to NI to do the installation. To silently run the built install.exe add these flags to the command prompt call --passive --accept-eulas. --prevent-reboot will suppress the NIPM reboot message if your installation needs it. I tend to add shutdown.exe -r -t 00 after a message and pause to my installation batch files to have users reboot afterwards.
10-22-2021 01:38 PM
Yet another option is to:
10-22-2021 01:40 PM - edited 10-22-2021 01:44 PM
These are great alternatives but I have zero desire to host an internal repository for NI packages.
I'm setting out to "mimic the functionality of clicking Install in the GUI."
Also, not all packages have an online installer. Case in point: DAQmx 18.5.
10-22-2021 02:25 PM
@Taxman414 wrote:
These are great alternatives but I have zero desire to host an internal repository for NI packages.
The Package Installer is a stand-alone installer, no feed/repo needed. Just a folder with files like any other unzipped installer
10-22-2021 03:12 PM
Very cool. As an example, how would you approach my original issue using NI Package Builder/NIPM?
10-22-2021 04:36 PM
Basically this or from the NI Package Builder Manual
You will need to have the packages you want to build into the installer already installed along with NI Package Builder. Then you create the Package Installer adding the package(s) you want to have installed. When you build the installer it will get all the dependencies needed as well. You can use the set package to always install so in case someone runs without the automation flags, they will be able to miss clicking the item in the installer
10-25-2021 10:04 AM
Just to clarify: If you have either an online and offline NIPM-based installer that you want to take the installation defaults of, you don't need to use NI Package Builder. You can just run that online or offline installer with the command-line I posted above from the manual - in either case, it will run as-is without setting anything up.
Using NI Package Builder is more work, but is a good choice if you want to create your own custom installer containing whatever set of packages you want. Note that NI Package Builder creates an offline installer that is exactly the same as the offline installer you'd download for a product, like DAQmx.
02-23-2022 03:36 AM
@Taxman414 wrote:
2) Launch NI Package Manager and browse to the title\version\bitness you want. Click Install and leave the "wizard" open.
This is a great hint!!! Now, is it possible to do it without clicking? I mean it is clear to me that NIPM can find feed automatically and probably add it temporally when you open wizard. How can I automate it?