[wix-users] Upgrade Variable

Collin Perschon collin.perschon at fidelissecurity.com
Mon Nov 14 16:00:36 PST 2016


Hello,

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.

The enum for BOOTSTRAPPER_ACTION is:

enum BOOTSTRAPPER_ACTION
{
    BOOTSTRAPPER_ACTION_UNKNOWN,
    BOOTSTRAPPER_ACTION_HELP,
    BOOTSTRAPPER_ACTION_LAYOUT,
    BOOTSTRAPPER_ACTION_UNINSTALL,
    BOOTSTRAPPER_ACTION_CACHE,
    BOOTSTRAPPER_ACTION_INSTALL,
    BOOTSTRAPPER_ACTION_MODIFY,
    BOOTSTRAPPER_ACTION_REPAIR,
    BOOTSTRAPPER_ACTION_UPDATE_REPLACE,
    BOOTSTRAPPER_ACTION_UPDATE_REPLACE_EMBEDDED,
};

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,

Collin


More information about the wix-users mailing list