Somebody knows:
How can I get the wix installer to delete a previous previously installed copy, whether small or large, before installing a new version of our installation.
If 1) cannot be performed when starting a new small / main setup, can I at least display a message stating that a previous version was found, and I need to delete it and cancel the setup first?
Thanks.
UPDATE:
I added the following to my settings. wxi
<Upgrade Id="$(var.UpgradeCode)"> <UpgradeVersion Minimum="$(var.CurrentVersion)" IncludeMinimum="no" OnlyDetect="yes" Language="1033" Property="NEWERPRODUCTFOUND" /> <UpgradeVersion Minimum="$(var.FirstVersion)" IncludeMinimum="yes" Maximum="$(var.CurrentVersion)" IncludeMaximum="no" Language="1033" Property="PREVIOUSVERSIONSINSTALLED" /> </Upgrade>
I defined the following in MyProduct.wxs
<?define CurrentVersion="5.0.0.18"?> <?define FirstVersion="1.0.0.0"?> <?define UpgradeCode="c1b1bfa0-9937-49eb-812c-5bac06eff858"?>
and finally i added this to my <InstallExecuteSequence>
<RemoveExistingProducts Before="InstallInitialize" />
But it still does not delete the old version when I upgrade my version to 5.0.0.19.
Maybe I am looking at it wrong, but in my window “Add or Remove Programs” I see that my installation is listed as 5.0.0.18 and I see the second entry as 5.0.0.19
Should I change the update code every time I change my version? I thought I read that this should never change.
Any ideas?
Thanks.
source share