[wix-users] Problem with version detection

Jon Earle earlej at hotmail.com
Thu Jan 18 10:12:36 PST 2018


I hear ya.  However (there's always a however...)


Prior to Wix, the installer was built with installshield.  At that time, the version numbering scheme was differnt - x.x.x-y... note the dash before the final number.


Wix hates that dash.  I fixed it in our burn.exe, however, the problem with that dash remains - the human readable version number is internally considered to be a string and is thus represented as a very large integer, larger than a current and properly dotted version number.  So, Wix always thinks we're downgrading.  Allowing upgrades and downgrades proved too flaky... so, we continue with the policy of "must uninstall before install".  PITA, but it works, we have no complaints about that process breaking anything.


________________________________
From: Hoover, Jacob <Jacob.Hoover at greenheck.com>
Sent: Wednesday, January 17, 2018 5:06 PM
To: WiX Toolset Users Mailing List
Cc: Jon Earle
Subject: RE: [wix-users] Problem with version detection

Crippling your bundle because of an old issue seems to be the wrong approach.  If your using MSI's, and you follow the rules, you should be able to easily upgrade...  IE, fix the problem instead of writing code to enable a bad behavior.

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Jon Earle via wix-users
Sent: Wednesday, January 17, 2018 3:23 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Cc: Jon Earle <earlej at hotmail.com>
Subject: Re: [wix-users] Problem with version detection

Yes, that makes sense.


I am working with OnDetectRelatedBundle  now...


        #region OnDetectRelatedBundle
        public override void OnDetectRelatedBundle(WPFBootstrapperEventArgs<Wix.DetectRelatedBundleEventArgs> e)
        {
            uninstallPriorVersionMessage = Bootstrapper.Engine.FormatString(Bootstrapper.Engine.StringVariables["CannotUpgradeMessage"]);

            // We are going to short-circuit and prevent any upgrades for the time being. When we wish to handle upgrades,
            // this method can be removed and the logic conducted in the OnDetectRelatedMsiPackage.
            if (e.Arguments.RelationType == Wix.RelationType.Upgrade
             && e.Arguments.Operation == Wix.RelatedOperation.MajorUpgrade)
            {
                // Write a message to the log and pop up a messagebox alerting the user.
                AlertAndLogMessage(Wix.LogLevel.Standard, uninstallPriorVersionMessage);

                // Close the installer.
                ShutdownInstaller();
            }
        }
        #endregion OnDetectRelatedBundle



________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of Nir Bar via wix-users <wix-users at lists.wixtoolset.org>
Sent: Wednesday, January 17, 2018 3:20 AM
To: WiX Toolset Users Mailing List
Cc: Nir Bar
Subject: Re: [wix-users] Problem with version detection

The GUID values in log are the bundle Id which gets a new value on each build.

In your BA you can handle OnDetectRelatedBundle and OnPlanRelatedBundle.




--Independent WiX Expert. Creator of-
JetBA: WPF Bootstrapper User Interface Framework

JetBA++: Native Qt Bootstrapper User Interface Framework





____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/ WiX Support | WiX Experts and Resources from FireGiant<http://www.firegiant.com/>
www.firegiant.com<http://www.firegiant.com>
WiX Support | Installation, Development, Deployment | WiX Experts and Resources from FireGiant



____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/


More information about the wix-users mailing list