07-08-2021 01:30 AM
We've built a package installer for two related applications - one is a "setup wizard" exe which needs to be run once (with admin privileges) before our main application can be run.
We setup a custom action in the package build specification that includes both both exe's to run the setup wizard "post install all". This basically works fine, the packages install and the setupwizard launches...
BUT...
If we do the install on a bare machine, the package installer installs a bunch of NI dependencies and drivers as well as our code - and it asks for a reboot post install. Our setup wizard gets called before the reboot though, and doesnt work properly as it relies on some of the things that are asking for the reboot to complete (probably NI DAQmx or VISA...).
We would like NIPM to run our setup wizard exe AFTER the reboot that is prompted at the end of the package install. Is that possible with NIPM?
07-08-2021 08:14 AM
I am not aware of anything built in to NIPM for this. However, windows does have ways to call a program on the next boot. I know so NI package do add reboot needed prompt and message after installation. Maybe someone from NI can let us know if/how we can leverage that.
07-08-2021 11:15 AM
So maybe a batch file or similar then that lines up the exe run on next boot, and then use NIPM to call that batch file post install and prompt for reboot...
That could work... maybe...
07-16-2021 10:57 AM
psmorris -
If at the time that NIPM calls a postall custom execute, if NIPM knows that a reboot is required, you can use the %REBOOTPENDING% token in the arguments that are passed to the postall custom execute to allow the custom execute to behave differently knowing whether a reboot is pending. The custom execute could then either execute the required operation, or defer executing the steps by scheduling the operation post reboot.
See the reference to %REBOOTPENDING% in the following topic in help for more information: https://www.ni.com/documentation/en/ni-package-manager/21.0/manual/instructions-xml-file-packages/