1

I got a problem. I want to upgrade my app during installation process, but I run into problem with versioning. I use version number in format e.g. 5.5.789.0, some new version has version number in format 5.5.12.1. I know that installer only works with first three numbers from version so MajorUpgrade is not suitable for me. New version would not be installed in this case. Is there a way in which I can check versions in some custom action and plan upgrade from there? I cannot change the versioning as app building goes through some automatic post-processes that also works only with first three numbers and it is not possible to change that behavior.

Thanks for suggestions.

EDIT: I am using WiX#.

PhilDW
  • 20,260
  • 1
  • 18
  • 28
benderto
  • 896
  • 11
  • 39
  • AFAIK wix is using windows version comparison methods. They rely on the first three numbers to detect an upgrade. Maybe you can create a bootstrapper module that deinstalls the old version before installing the newer one. – Stephen Reindl Feb 09 '18 at 10:28
  • Do you have control over the invocation parameters used during installation? – Ritmo2k Feb 09 '18 at 20:21
  • Nope, but I am using WiX# – benderto Feb 10 '18 at 09:32

1 Answers1

1

It's not obvious to me why you can't use the WiX majorupgrade element. The settings would be AllowDowngrades=yes, maybe AllowSameVersionUpgrades=yes.

Using Schedule=afterInstallValidate is (as the docs say) removes the old product entirely before installing the new upgrade.

PhilDW
  • 20,260
  • 1
  • 18
  • 28
  • I don't want to allow downgrades. Example in question doesn't work with MajorUpgrade as it would perform the downgrade instead of upgrade that I need. Problem is in my versioning schema as I need to check last (fourth) part for upgrade. MajorUpgrade uses only first three parts. – benderto Feb 11 '18 at 11:10
  • 1
    By definition, if you are going from 5.5.789 to 5.5.12 you are doing a downgrade, and allowdowngrades is how you say that. It seems that your definition of "upgrade" is "created after the other one" but that's not the way that Windows Installer defines it. – PhilDW Feb 12 '18 at 18:26