OK, what I'd like to do is create a batch file that automates the bring-up of a new clean system (nothing installed but Windows).
Solved! Go to Solution.
BTW, here's the command line I'm trying to execute and the resulting error:
C:\>"C:\Program Files\National Instruments\NI Package Manager\nipkg.exe" upgrade --all --yes --accept-eulas The following packages will be upgraded: ni-package-manager-upgrader, ni-package-manager-released-feed 0 to install, 2 to upgrade, 0 to remove, 0 to downgrade Need to get 3.95 MB of archives. After this operation, 0 bytes of additional disk space will be used. Error -125090: A plugin returned one or more errors at the beginning of the transaction. Additional error information: Error -125522: There was a problem calling to the database of installed packages (SQL function call 'sqlite3_prepare_v2' returned error code 14 with error message 'unable to open database file'). Error -125522: There was a problem calling to the database of installed packages (SQL function call 'sqlite3_prepare_v2' returned error code 14 with error message 'unable to open database file').
OK, so it looks like the sqlite3_prepare_v2 errors were due to needing to run the command as an Administrator.
Now, I'm running into the fact that I can't seem to install the ni-systemlink-client from the command-line. It says the package cannot be found.
C:\Windows\system32>"C:\Program Files\National Instruments\NI Package Manager\nipkg.exe" install ni-systemlink-client
Unable to locate package: ni-systemlink-client
I'm assuming that I need to somehow add a package feed. However, when I use the NI Package Manager GUI, it shows in the search results just fine. How do I add the right feed from the command line?
I'm not sure what is going on for #3, so I'll let someone else comment on that.
One additional note, you can use the Package Repository from the SystemLink Server to "Replicate" the NI SystemLink Client from ni.com to your own local repository. Then just use that feed URL in #4 instead of the one on ni.com. This is useful if your SystemLink Server has internet access, but your targets don't.
Thanks much for your post; we are doing the same thing and I was also trying to figure out how to automate the client configuration to set the server name.
One additional trick: I found that copying our custom version of the master.conf file over to the C:\ProgramData\National Instruments\salt\conf\minion.d directory before installing the systemLink client made it so that the restart of the service wasn't necessary, and the server found that the client was pending approval immediately after the client installation was complete.
Also worth noting that if anyone is planning to create an image of a Windows system with the SystemLink Client pre-installed, I would recommend calling C:\Program Files\National Instruments\Shared\salt-minion\salt-minion-cleanup.bat before you to take the image or after you deploy it.
This will ensure that every system has a unique minion ID and set of keys.
How were you able to download and install NIPM from the command line? (#1 and #2 in your original procedure)
For myself, I already had NIPackageManager19.0.exe downloaded to a network drive so I just needed a batch file to call
start /wait NIPackageManager19.0.exe /Q
If you needed to also download it you could use powershell or some similar scripting engine to download from here: http://download.ni.com/support/softlib/AST/NIPM/NIPackageManager19.0.exe
Here's a link that tells how to use powershell: https://blog.jourdant.me/post/3-ways-to-download-files-with-powershell
Putting it all together, this works well.
REM download to nipm.exe powershell Invoke-WebRequest -Uri http://download.ni.com/support/softlib/AST/NIPM/NIPackageManager19.0.exe -OutFile nipm.exe REM install it start /wait nipm.exe /Q