wixwindows-installermajor-upgrade

Why uninstallation of msi doesn't delete registry and installdir?


we are using wix project to create msi. We were trying to do major upgrade.

We did change the product code and product version and created new Msi

New msi is installed [ registry keys were created and installdir contains latest files] in the machine.

Now we are seeing two product codes in Uninstall registry key. I think old msi is not uninstalled properly.

When we update product code it should take care of it automatically,isn't it? What could have been the reason for not uninstalling the older one?


Solution

  • When we update product code it should take care of it automatically,isn't it?

    No, changing the product code isn't enough to cause the previous version to be removed.

    To implement an upgrade which removes the previous version, use the MajorUpgrade element as described in the wix documentation on the subject.