Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 6

Basic MSI, How do I detect Upgrade Mode

I have a basic MSI that I'm working on and I have the install, Modify mode and repair modes all working the way I want. No I need to add a couple of custom actions to the upgrade mode but I'm not sure what to look for to see if I'm in upgrade mode.
Is it running in Maintiance mode? Can I insert a custom action after Maintiance Welcome?
What property and Value do I look for?

Thank you
Brandon Lowe
Labels (1)
0 Kudos
1 Reply
Level 10

Hi Brandon,

you need to know what sort of upgrade you are working on.
Are you thinking of a minor upgrade, a major upgrade or a small update?
See the following document to see what is supported with each of them:

Once you have decided, you can then find out what condition to use.
To give you a clue:

  • For a patch, you could copy-paste the condition that displays the PatchWelcome dialog.
  • For a minor upgrade, you could copy-paste the condition that displays the SetupResume dialog.
  • For a major upgrade, you can use the property set in the "ActionProperty" column in the Upgrade table.

But don't forget the following points:

  • You also need to think about silent installation. So your custom action might have to be sequenced in the InstallExecuteSequence.
  • Some properties like IS_MINOR_UPGRADE or IS_MAJOR_UPGRADE are only set if the installation is launched with setup.exe. This is not always applicable when a system administrator performs a silent installation. So, I would not use such properties in your conditional custom actions.
  • Minor upgrades should be avoided, in my humble opinion. And you are likely to face some problems when deploying minor upgrades if you have used dynamic links in your Basic MSI project.
0 Kudos