WIX program still exists in Add/Remove section of Control Panel

1.3k Views Asked by At

I made my WIX install option, upgrade so that it removes previous DLLs, However when I go into Control Panel, and go to the Add/Remove Programs section, the previous version is still present.

How do I remove this previous icon from this Add/Remove section?

.....

In response to the comment below Sorry I still cant get this to work, previous versions still show in the Add/Remove Programs section when I upgrade, Here is some code

I did have Id initially to "*" but now I just change Product ID when I make my next build

<Upgrade Id="$(var.UpgradeCode)">
  <UpgradeVersion Minimum="$(var.ProductVersion)" OnlyDetect="yes" Property="NEWERVERSIONDETECTED"/>
  <UpgradeVersion Minimum="1.0.0"
                  IncludeMinimum="yes"
                  OnlyDetect="no"
                  Maximum="$(var.ProductVersion)"
                  IncludeMaximum="no"
                  Property="PREVIOUSVERSIONSINSTALLED" />
</Upgrade>
1

There are 1 best solutions below

0
On

The upgrade id must be the same between versions that you want to upgrade. If you want to perform a major upgrade, were you remove previous installations and then install your new version, the property that must change is product id

An "*" causes a new guid to be generated by WIX

You want something like this:

<!--Product -->
<Product Id="*" Name="$(var.Product.Name)" Language="$(var.Product.Lang)" Version="$(var.Product.Version)" Manufacturer="$(var.Product.Manufacturer)" UpgradeCode="{Replace me with a constant Upgrade Guid}">
<Package InstallerVersion="$(var.Package.InstallerVersion)" Compressed="yes" Platform="$(var.Platform)" />   


   <!--Condition Messages-->
    <Condition Message="A newer version of $(var.Product.Name) is already installed. Exiting installation.">
      <![CDATA[Installed OR NOT NEWER_VERSION_FOUND]]>
    </Condition>

<!-- Upgrade Table -->
<Upgrade Id="{Replace me with a constant Upgrade Guid}">

  <UpgradeVersion
    Property="OLD_VERSION_FOUND"
    Minimum="0.0.0.0"
    Maximum="$(var.Product.Version)"
    IncludeMinimum="yes"
    IncludeMaximum="no"
    OnlyDetect="no"
    IgnoreRemoveFailure="yes"
    MigrateFeatures="yes"
    Language="1033"  />

  <UpgradeVersion
    Property="NEWER_VERSION_FOUND"
    Minimum="$(var.Product.Version)"
    IncludeMinimum="no"
    OnlyDetect="yes"
    Language="1033"  />

</Upgrade>

<!--Removes the old version and then installs the new version-->
<InstallExecuteSequence>
  <RemoveExistingProducts After="InstallInitialize"></RemoveExistingProducts>
  <InstallExecute After="RemoveExistingProducts"></InstallExecute>
</InstallExecuteSequence>

You should also note that you cannot switch between per user and per a machine installs between versions.