I am trying to get the following to work:
On the first installation of a program, it modifies the environment variables of the system, and therefore you must restart in order for the program to fully work. Doing this in WiX is fairly straight forward, you just schedule a reboot:
<InstallExecuteSequence>
<ScheduleReboot After="InstallFinalize" />
</InstallExecuteSequence>
The problem I am having is I want to be able to do minor upgrades to this program (ones where the version number changes but the Product GUID does not) and this does not require a reboot.
In my attempts to get conditional rebooting working, I have tried to do is this:
<Product
...
Version="1.0.1"
UpgradeCode="MYUPDATEGUID-C39B-4DDE-BA5B-6113463F60C2"
...
>
<Upgrade Id="MYUPDATEGUID-C39B-4DDE-BA5B-6113463F60C2">
<UpgradeVersion OnlyDetect="yes" Property="UPGRADING"
Maximum="1.0.1" IncludeMaximum="yes" />
</Upgrade>
...
<InstallExecuteSequence>
<ScheduleReboot After="InstallFinalize">NOT UPGRADING</ScheduleReboot>
</InstallExecuteSequence>
This is great, except it doesn't work. No matter what I do, it always tries to schedule a reboot.
It seems like the problem is the property UPGRADING
--if I replace NOT UPGRADING
with UPGRADING
, it never requests a reboot.
Any insight from anyone more experienced than I am would be awesome.