6

We have a third party dll that was on version 1.0 in version 5.0 of our application.

In version 6.0 of our application, we upgraded the third party dll to version 2.0. But that caused problems for the application and we wanted to roll back.

So in version 6.1 of our application, we wanted to roll back to version 1.0 of the third party dll. But the Windows Installer sees that component as being a version greater than the one that is in the MSI and doesn't want to updated it.

How do I roll back the third party dll in the 6.1 version of our product?

Michael Hedgpeth
  • 7,732
  • 10
  • 47
  • 66

1 Answers1

2

If your update needs to follow component rules, then you should look at having both Dlls to the update (with the same component guid) as transitive components, the unwanted one with a false condition and the other one with a true. They'd both be in the same location of course. The false value will cause the older one to be made absent. This should work ok with a patch.

If you're willing to do a major upgrade it's much simpler. Sequence RemoveExistingProducts early (such as after InstallInitialize) and all the old files will be uninstalled and then the new ones installed, and there are no file overwrite rules being used.

PhilDW
  • 20,260
  • 1
  • 18
  • 28
  • A major upgrade should probably work well. But, be aware that a component is removed at uninstall only if 1) the component is not permanent and 2) there are no remaining features (of any products) that references it. – Tom Blodget Aug 15 '14 at 16:56
  • This A was accepted, so please correct me if I am wrong, but afaik a major upgrade does not work. Please see http://stackoverflow.com/questions/6870405/wix-upgrade-question-files-major-version-was-incremented-but-revision-is-low?lq=1 http://stackoverflow.com/questions/4227456/windows-installer-deletes-versioned-file-during-product-upgrade-instead-of-down?rq=1 – Lukas Rieger May 21 '15 at 17:01
  • Major upgrades work in the vast majority of cases. There are sometimes bugs like this https://support.microsoft.com/en-us/kb/905238 or sometimes people don't follow component rules so there is indeed an installed file with a higher version with the same guid, but the incoming file is a different file with the same guid. So there are occasional individual issues with some major upgrades, but thay are used literally every day without any problems. – PhilDW May 21 '15 at 17:16