[wix-users] Upgrade Variable

Collin Perschon collin.perschon at fidelissecurity.com
Tue Nov 15 08:19:12 PST 2016


Yeah I don't think I did this in clean way (my modified WixStdBA), but I figured it out.  I think that after this release , I will start working on putting together a cleaner solution for my installer where I don't have to modify anything.  Thanks for your help.


-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Phill Hogland
Sent: Tuesday, November 15, 2016 7:18 AM
To: wix-users at lists.wixtoolset.org
Subject: Re: [wix-users] Upgrade Variable

The way I do this is:

1) I author each bundle with a bundle/@tag .

2) In DetectRelatedBundle handler, if e.Operation is ReleatedOperation.MajorUpgrade and e.BundleTag is the tag for this bundle, then I set a property in my model to indicate that I am doing a Major Upgrade.

I have not had any reason to modify WixStandardBootstrapperApplication.cpp so I am not sure I follow that comment.  If not using a custom ba, but using the WixStdBA I would look at parsing the raw command line string in a bafunctions.dll, although I have not done this for several years, and don't recall if it would lead to a solution.

From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of Collin Perschon <collin.perschon at fidelissecurity.com>
Sent: Monday, November 14, 2016 6:00:36 PM
To: wix-users at lists.wixtoolset.org
Subject: [wix-users] Upgrade Variable


I am trying to determine if my custom bootstrapper application is in a MajorUpgrade or an Install.  I looked through the Burn Built-in variables and thought that maybe WixBundleAction or WixBundleInstalled would be the ticket.  However they both return (5 and 0) respectively for both my install and upgrade environments.  So far the only file I have modified is the WixStandardBootstrapperApplication.cpp to add a an extra options page.  IE:

EULA > Options / Install

I would like it to go this way for an upgrade:

EULA > Upgrade Detected > Options / Install.

The reason is that we want to prompt the user for some information that will help make their life easier for running the application after the upgrade.  It isn't required information, but it will save the user a lot of time ( and potential headaches ) if they provide it before we upgrade.  I've already added an "advanced options" page, so adding a new page won't be an issue.  I'm just kind of lost on how to determine if I'm in an upgrade or not.



So, I'm currently in the install.  I'm wondering why I didn't get to UPDATE_REPLACE for upgrade.  (Perhaps it is because I'm doing major upgrades which is uninstall / install? )

If anyone can point me in the right direction I would really appreciate it.

Thanks so much,


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

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

More information about the wix-users mailing list