[wix-users] Idea to control auto-reboots from a passively run setup.exe
Chris Moxon
chris.moxon at eque2.com
Tue Nov 3 07:15:25 PST 2015
Hi,
This is sort of a follow on question from last week; the situation we have is that when our app is run, it checks to see if an update is available on our website; if there is one and the user selects to install it; the app downloads the installers and runs the burn setup.exe passively, as we don't want the user to be concerned how its installed. This works fine and dandy, unless something (be it Windows or WiX) determines that a re-boot of the PC is required and because we are running it with the -passive argument, then the PC gets re-booted automatically without giving the user the chance to close any documents etc and if the PC is a server, then that could have drastic consequences.
So, to get around this - I am working on this solution : my app calls a vb program instead of directly calling the setup.exe. The VB app in turn then calls the setup.exe with both the -passive AND -norestart arguments. When the install is complete, the vb app searches inside the install logs for the phrase "Restart: Required" and if it finds it, then tells the user that a re-boot is required (& thus gives them the opportunity to close any open docs etc) and then hitting a button, the PC will be re-booted - otherwise ( the phrase is not found ) the vb app just closes without re-booting.
Now my question is : Is there a better way to do this ? It just seems strange that I have to resort to creating a wrapper vb app to call my setup, just because the setup can't warn the user of a pending reboot, because we have decided not to show the installer UI.
In case anyone wonders why we don't just call the setup.exe normally (ie not passively) and then we would get a dialog at the end telling the users that a re-boot is required, is because when we do this, we also get 4 occurrences (maybe due to the fact that the setup.exe calls 3 msi's and 1 exe) of an annoying message that pops-up saying "No Action was taken as a system reboot is required" - the user has to hit the OK button, for the install to continue - if someone could let us know how to stop those messages from appearing, then we might decide to go down that route ?!
Cheers,
Chris.
If you've received this email by mistake, we're sorry for bothering you. It may contain information that's confidential, so please delete it without sharing it. And if you let us know, we can try to stop it from happening again. Thank you.
We may monitor any emails sent or received by us, or on our behalf. If we do, this will be in line with relevant law and our own policies.
Eque2 Limited. Registered in England at Freetrade Exchange, 37 Peter Street, Manchester, M2 5GB. Registered number 08179642.
More information about the wix-users
mailing list