From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

SystemLink Forum

cancel
Showing results for 
Search instead for 
Did you mean: 

NI Package Builder with post-install

Solved!
Go to solution

I am using NI Package Builder to create a package that will install a vipc file. It has a post-install that calls the appropriate version of labview to install the vipc file. When I use the NI Package Manager, everything works exactly how I want it to. When I use our systemlink website, the installation process hangs. What I have found is the system link method is calling labview under the system user where as the package manager is calling labview under my user. When labview is called under the system it will just hang and not do anything. I have to kill the process so the install will fail. Otherwise it will just sit there not doing anything. Here is a screenshot of how I have configured my post-install.

 

ss52642_2-1604935571159.png

 

0 Kudos
Message 1 of 11
(2,751 Views)

In my past experience in TestStand the system user which not display any visible UI and if something about the call is displaying a dialog, you have no idea.

 

Do you have access to the system at the time of the hang such that you can look to see the state of the processes? If yes, do you see the LabVIEW process running? If yes, you might be able to get a dump of the process so that someone might be able to see what it is doing. 

Scott Richardson
0 Kudos
Message 2 of 11
(2,735 Views)

I agree with Scott.  When SystemLink is deploying a package it is running as a SYSTEM process, not a user.  The installation has to run completely silent and cannot have any popups or dialogs for the user to interact with otherwise it will hang.

0 Kudos
Message 3 of 11
(2,729 Views)

Is there a way to make system link deploy a package not under the system process? I have tried changing the highlighted services to run under my account but it did not help.

ss52642_0-1604960537477.png

Basically I am trying to use system link to install a vipm.

0 Kudos
Message 4 of 11
(2,724 Views)

You can try changing the NI Salt Minion service.  It is the service that is used by SystemLink to remotely execute things like package installation. Does VIPM have any silent flags that they can use from its API or command-line to perform the installation without any user interaction?

0 Kudos
Message 5 of 11
(2,709 Views)

Changing the salt minion service to login under a user account works. VIPM does have a quiet flag to suppress any dialogs that the packages might generate. Not sure if changing the service to login as a user is a viable option because then I would have to make sure this is set on all developer computers. I have also been trying to use PsExec but I think there is still some kind of permission with it being called from the system user.

0 Kudos
Message 6 of 11
(2,692 Views)

I am glad it worked, for now. I think the debug steps above would need to done to get more information.

Scott Richardson
0 Kudos
Message 7 of 11
(2,683 Views)
Solution
Accepted by topic author ss52642

The solution that I have found is to use PsExec. Even though changing the salt minion to log in with a different user account worked, I cannot depend on that being set correctly on each developers computer. So I was able to create my own batch file and use PsExec to call it under a different user. The batch file is now able to call VIPM and apply the VIPC file. Here is how I am using the PsExec call.

 

psexec -i -e -h -u [user] -p [password] -accepteula \\localhost "%Temp%\post-install.bat" "%Temp%\[Filename].vipc" 2020 64

 

One more caveat about doing this, it does not like to work if you have a remote desktop session open during the installation. If you are locally logged into the computer or use VNC to remotely connect, then it will work.

0 Kudos
Message 8 of 11
(2,660 Views)

Thanks for sharing your creative solution. I know with some networks, IT can disable some features like PowerShell, so not sure if PsExec could be disabled on a client system. Just something to consider.

Scott Richardson
0 Kudos
Message 9 of 11
(2,652 Views)

@ss52642 wrote:

Changing the salt minion service to login under a user account works. VIPM does have a quiet flag to suppress any dialogs that the packages might generate. Not sure if changing the service to login as a user is a viable option because then I would have to make sure this is set on all developer computers. I have also been trying to use PsExec but I think there is still some kind of permission with it being called from the system user.


Could you describe the process for doing this? I attempted to configure both the "NI Salt-Minion" and "NI Minion Agent Service for Systems Management" services to run under a user account, but when I install a package with a post-install action to run an executable, the executable is still running under the SYSTEM account and not the named user account.

 

( Cross post )

0 Kudos
Message 10 of 11
(2,535 Views)