[wix-users] Idea to control auto-reboots from a passively run setup.exe

Wesley Manning wmanning at dynagen.ca
Tue Nov 3 07:56:00 PST 2015


Burn uses standard windows error codes: https://msdn.microsoft.com/en-us/library/windows/desktop/ms681381%28v=vs.85%29.aspx.
One of them is
ERROR_SUCCESS_REBOOT_REQUIRED

    3010 (0xBC2)

    The requested operation is successful. Changes will not be effective until the system is rebooted.

There is a forced reboot but I forget what the code for that is.  Also I think success (no reboot required) is zero.

Wes

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Chris Moxon
Sent: November-03-15 11:36 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Idea to control auto-reboots from a passively run setup.exe

>> Why not check the exit code from the setup.exe process?

Ooh I like the sound of that ... though unfortunately have no idea how to do it !! Any tips/websites you know would be appreciated.

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Rob Mensching
Sent: 03 November 2015 15:20
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Idea to control auto-reboots from a passively run setup.exe

Why not check the exit code from the setup.exe process?

_______________________________________________________________
 FireGiant  |  Dedicated support for the WiX toolset  |  http://www.firegiant.com/



-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Chris Moxon
Sent: Tuesday, November 3, 2015 7:15 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: [wix-users] Idea to control auto-reboots from a passively run setup.exe


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.


____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/


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.

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/



More information about the wix-users mailing list