I only want to reboot when uninstalling. This is a fragment from my WiX file:
<InstallExecuteSequence>
...
<Custom Action="CleanRegistry" Sequence="7100">REMOVE~="ALL" AND NOT UPGRADINGPRODUCTCODE</Custom>
<ScheduleReboot Sequence="7200">REMOVE~="ALL" AND NOT UPGRADINGPRODUCTCODE</ScheduleReboot>
</InstallExecuteSequence>
Running the generated MSI produces the following log:
MSI (s) (48:7C) [10:19:29:951]: Skipping action: CleanRegistry (condition is false)
MSI (s) (48:7C) [10:19:29:951]: Doing action: ScheduleReboot
How is it possible that the same condition evaluates to False then True? Does ScheduleReboot ever ignore its condition?
Edit: I am also trying to use the condition REBOOT~="Force" to conditionally execute a command when a reboot has been requested by my customaction. This condition is never evaluating to true and my command is not being run. The property is being set by a call to MsiSetProperty from a custom action. Either this custom action is not working or I have made a mistake in my condition! Any suggestions?