I've got a WiX deferred custom action that conditionally modifies some registry keys. For the changes to take effect, a reboot is required. I'd like the user to get the standard dialog box that prompts them to reboot after the installation completes.
How can I schedule a reboot from a deferred custom action?
Why do you have a custom action doing something that MSI/WiX knows how to do natively?
A cleaner approach would be to have registry values associated with a component that has the needed condition. Then you can have a simple custom action trigged by that same condition call MsiSetMode with the MSIRUNMODE_REBOOTATEND argument. If you are using C#/DTF that's session.SetMode(InstallRunMode.RebootAtEnd).
This way if the install is aborted, canceled, failed it can roll back the registry changes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With