开发者

2 instances of a program after upgrading using WiX

I am creating an upgradable installer using WiX that needs to remove the existing program entirely before installing the new version. I have the files upgrading and adding that the newer version should be but I'm left with 2 instances of the Program in the Add/Remove program scree开发者_运维知识库n. Below is an example of how I am trying to remove everything.

<Product Id="064e9bca-dcf5-412d-9a8f-dafec3bd3406" Name="testInstall" Language="1033" Version="1.0.14" Manufacturer="testInstall" UpgradeCode="5dd5747f-c598-4133-8c7d-252ae3dee8a5">

<Package InstallerVersion="301" InstallPrivileges="elevated" InstallScope="perMachine" Compressed="yes" />

<Upgrade Id="5dd5747f-c598-4133-8c7d-252ae3dee8a5">
  <UpgradeVersion Minimum="1.0.0"
                  IncludeMinimum="yes"
                  Maximum="1.0.13"
                  OnlyDetect="no"
                  Property="OLDERVERSIONBEINGUPGRADED" />
</Upgrade>

<InstallExecuteSequence>
  <RemoveExistingProducts After="InstallInitialize"/>
</InstallExecuteSequence>

Any help that can be provided would be appreciated.


Everytime you want to create a new updated package, change both ProductVersion and ProductGUI:

<?define ProductVersion="1.0.76"?>
<?define ProductGUI="945C22A0-BB37-4F7D-9B28-2F02491A0698"?>

<Upgrade Id="b14563a6-db4f-451c-8b9d-03e480687290">
    <UpgradeVersion OnlyDetect='yes' Property='NEWERVERSIONDETECTED' Minimum='$(var.ProductVersion)' IncludeMinimum='no' />
    <UpgradeVersion Minimum="1.0.0" IncludeMinimum="yes" Maximum="$(var.ProductVersion)" Property="OLDERVERSIONBEINGUPGRADED" />
</Upgrade>

...

<InstallExecuteSequence>
   <RemoveExistingProducts After="InstallValidate" />
   ...
</InstallExecuteSequence>

NOTE: Use your own GUID for Upgrade/Id, of course.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜