Running an .EXE bootstrapped .MSi installer and when we run it with /qn, the self-generated EXE_CMD_LINE contains /exenoupdates, basically killing one of the intentions of the package itself, which is to kick off a custom action that uninstalls a specific product using its product code.
Works fine with GUI. Is there an override switch for this? If not, why, oh why, would this even be included in the bootstrapper?
The /exenoupdates switch is generated after the bootstrapper searches for updates and it finds no newer version, although it does not affect the uninstall custom action at all.
However, when you run the .MSI installer with /qn it only runs the actions found in the "Install Execution Stage", so your custom action cannot be called if it is placed in the "Wizard Dialogs Stage" or "Finish Dialogs Stage".
On the other hand, if you place your custom action in the "Install Execution Stage" you will encounter the problem that two MSI packages cannot run in the same time (in your case the main MSI and the uninstall MSI called by your custom action).
So, in order to achieve what you want, you can go in the Upgrades page, click on the [Upgrade] toolbar button and choose the MSI package that you want to uninstall. You can also set a minimum and a maximum version for the product that you want to uninstall. In this case the product will be uninstalled before the installation of your main MSI when the "Progress Dialog" is shown. Also, make sure that the "Automatically upgrade older product version" option is selected in the Upgrades page.
Let us know if this helped, otherwise give us more details about your scenario.
Yes, I tried that. The issue at hand is the original version of the product is very far out of date and whoever kept creating our packages kept the upgrade code from previous major versions. I don't know why. This is making the uninstall incompatible and throwing errors and automatically rebooting upon uninstall.
I modified the RunMsiexec custom action and removed [OLDPRODUCTS] and put the product code from the old installer in there and it works during GUI, just not in /qn.
So, what I'm saying is your solution is the correct one, however, it is not working for this specific one-off installer that I've been tasked to create. This is a very special situation for a single customer and once they get this installer, the source will be burned and the message will self-destruct in 9 seconds.
Usually the same upgrade code should be used for all versions, as this identifies the product family, as documented by Microsoft.
and it works during GUI, jus
As my colleagues said, you cannot run this custom action with /qn because Windows Installer will not allow you to, only one MSI install/uninstall is allowed to run during the Install Execute Sequence, i.e. exactly the sequence that gets executed when
running the MSI with /qn.
Solved. I created a stub that does all the work. Can we request that you add a place where you can add pre and post .msi actions in the bootstrapper? That would cure all my ills.
I am not sure I understand this, we already have pre-install and post-install prerequisites support. These execute exactly when you want. Can't you run your actions
as pre-install or post-install prerequisites?
FOLLOW US
Get the latest news in Application Packaging