cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
BhaaLseN
Level 3

Get Version of old Product during Update?

I am currently working on a new Version of a Setup (3.4.0) where several new input parameters (in this case: an additional path) were introduced.

Now, during upgrade, I want to check whether the version I am updating from is < 3.4.0 and show an additional dialog to force the user to input the new path.
However, I'd like to skip this step when I'm updating from >= 3.4.0 (at some point in the future, at least), because the path should already be there in those cases.

The only property that sounded remotely correct during an upgrade attempt with /L*v logging was "VersionHandler", but its value "3.01" never appears anywhere in my old Setup (nor does it match the old Version number of 3.3.0).

Is there a property supplied by default that I can use, or do I have to roll my own? The Setup is a Basic MSI one; I know how to skip Dialogs based on Property Values and I could even use InstallScript to set my own Property based on a few method calls - conversion to an InstallScript Setup is not feasible at this point.
Labels (1)
0 Kudos
2 Replies
KathyMorey
Level 10

Create a major upgrade item with a maximum version of 3.4.0 inclusive with one action property, and another with a minimum version of 3.4.0 not inclusive with a different action property. You can then condition your custom action on the presence of the first action property
0 Kudos
BhaaLseN
Level 3

Interresting idea, didn't think of that since I was using automatic update entries until now.

But:
1) Does this also work when two upgrade entries would match? For example, 3.5.0 adds another condition I'd like to skip that way, and someone updates from 3.3.0 (skipping the 3.4.0 stuff, going right up). Do I get both, do I have to code that differently, or do I only get the highest matching one?
2) What happens when the automatic update would have done a minor update, and not a major one? Doesn't this affect the way the whole update process is executed; and possibly make my changes obsolete (since it does a full uninstall or something anyways)?

I was kinda assuming that I could simply get the version (or at least Label) from the small dialog saying "This setup will perform an upgrade of Product v3.3.0" and work with that.

Edit: For now, I'm using a Major Upgrade entry with "Detect only" set to true to add the property, along with my existing Automatic Upgrade entries. Seems to work for now, but still feels a bit odd.
0 Kudos