[wix-users] Updates with Major.Minor.Build.Revision needed

Steffen Vogel codedevbird at gmail.com
Wed Aug 10 03:32:00 PDT 2016


Dear WIX-mailing list,

 

I am working on an installer that installs our companies products. As we
only use the 4th version, (for example 1.0.0.123 or 1.0.0.345) in our
buildsystem, I was explicitly told to make the installer work with it so we
don't have to change it (all our products are doing this).

It should upgrade older versions and, if not preventing it which would be
the best, at least should warn if you are going to do a downgrade.

 

As I don't know how to trigger the updates etc. manually, and do not really
want to do this stuff manually, I am using the MajorUpgrade-tag in the
installers:

 

<MajorUpgrade DowngradeErrorMessage="!(loc.NewerVersionInstalled)"

                  AllowDowngrades="no"

                                  AllowSameVersionUpgrades="yes"

                  Schedule ="afterInstallInitialize" />

 

This handles the updates really fine but allows downgrades if only the 4th
version differs, which is not good.

I am now searching for a possibility to prevent users from doing a
downgrade.

Additionally, I before used the <Upgrade>-tag with <UpgradeVersion> which
filled me some properties (,NEWERVERSIONDETECTED',
,OLDERVERSIONBEINGUPGRADED' or ,SELFFOUND') depending on what was going on.

With using the <MajorUpgrade>-tag, these aren't getting filled anymore and
my conditions won't work anymore as expected.

 

Now I am asking you to please help me find a good solution in which the
installer uses all (Major.Minor.Build.Revision) for version comparison, 

which prevents downgrades with a specific error message and tells me what's
going on via properties or something so I can schedule my actions depending
on that. 

Or is there any better idea???

 

Any help is strongly appreciated!!!

 

Many many thanks,

Steffen Vogel

 

Note:

I tried to write my own custom action that could take a path to a file and
the current installers version and gets the files version from it, so we
have something to compare.

With this custom action I can set properties like ,NEWERVERSIONDETECTED',
,OLDERVERSIONBEINGUPGRADED' or ,SELFFOUND'. If I find a new version for
example, I will set ,NEWERVERSIONDETECTED' to ,1'.

 

But I don't know if it's really good / safe and how to schedule it
correctly, I think is has to run before the Welcome dialog is being
displayed but I am relatively new to WIX and don't know enough about
sequences in WIX.

 



More information about the wix-users mailing list