Uninstalling product installed through WIX .MSI

Feb 6, 2015 at 5:51 AM
Previously I had created WIX MSI installer for one product. Prerequisites are installed separately. That is in production.

Now I created WIX bundle from where prerequisites are installed and also I want to do a major upgrade for original MSI product.

So now question is how can I remove MSI's entry from Windows Uninstaller and install new version?
Feb 6, 2015 at 6:57 AM
Edited Feb 6, 2015 at 6:57 AM
I don't know if you have UPGRADE markup in your previous install. We use following WIX Upgrade markup to do a major upgrade of previously installed product:

Please note that var.UpgradeCode must be same in present and previously installed MSI. This is how Windows Installer Service track and do upgrades.
<Upgrade Id="$(var.UpgradeCode)">             
Please also consult WIX documentation and online forums for its details.

If in your previous MSI, Upgrade scenario was not defined this your new msi containing above Upgrade markup is not able to do major upgrade, then consider writing a small Custom Action/Procedure/Function in your Bundle to call Unattended Un-installation of previously installed MSI, using MsiExec command line.

Hope this helps.
Feb 6, 2015 at 8:39 AM
As Farrukhw said if you have an upgrade element this should be automatic. You can also use the upgrade element to remove old MSIs if you didn't have an upgrade code or the upgrade code has changed.

This is really a question for wix-users.