views:

238

answers:

2

I try to perform a major upgrade with my MSI installer with a quiet installation. The installer already works well when using a normal installation with a full user interface. In this case the old product is uninstalled because FindRelatedProducts action (from the UI sequence in FolderForm) detects my previously installed version.

When the /qr switch for msiexec is used to suppress the dialogs and need for user interaction (essentially reusing the settings from the last version), then it fails:

MSI (s)  : Doing action: FindRelatedProducts
Action  FindRelatedProducts. Searching for related applications
Action start  FindRelatedProducts.
MSI (s)  : Skipping FindRelatedProducts action: already done on client side
Action ended  FindRelatedProducts. Return value 0.

As a result, there are two entries that show up in the the installed software dialog of Windows - one for the old and new version, so in that case the old version was not uninstalled/removed.

Is there any other msiexec command switch that I could use that would still execute the FindRelatedProducts action? Could it be integrated elsewhere so that it would be executed in such a quiet installation?

Thank you for your support! Marco

+1  A: 

I found a way to solve the problem and the upgrade is performed as expected.

When launched with /qb switch for msiexec, FindRelatedProducts is exectuted and the upgrade works as expected.

I havent found a better specification or explanation on the different UI levels and implications on the execution, but it might be enough information to debug and resolve similar issues.

Switch /qr seemed to trigger the skipping: "Skipping FindRelatedProducts action: already done on client side".

Thanks for your support!

marco4net
A: 

You seem to have focused on a symptom instead of the actual problem. FindRelatedProducts only needs to execute once as long as the following two things are true: the action property of each Upgrade entry is a public (ALL_CAPS) property, and this property's name is listed in the property SecureCustomProperties. When both of these are true, the first the UI sequence should set the action property, its value should make it intact to the execute sequence, and RemoveExistingProducts should process and remove the associated product codes listed in that property. (Of course, running /qb will skip the UI sequence and fall back to running just the execute sequence entry like you describe in your answer).

Michael Urman
Both is true, it is in CAPS and is listed in SecureCustomProperties, and it is executed. Unfortunately FindRelatedProducts only returns the log output above and doesnt find the previously installed product:"MSI (s), it returns this: Skipping FindRelatedProducts action: already done on client side." I can only assume that in case of /qr, FindRelatedProducts is skipped because it does exist in the UI sequence (even if it is not executed due to the reduced UI sequence). As a result, there is the duplicate entry. This might be a intended behavior, but I cant tell if that is the case.
marco4net
So there's no previous logging for the UI sequence's FindRelatedProducts action, only the Execute Sequence's skipped one? That's not what I would have expected at all. I'll have to run some tests later. :)
Michael Urman
Yes, exactly, it only happens once when using /qr and then it is run in ExecuteSequence, thanks for your support! I dont know if that might be intended or a bug in my particular version of MSI/Windows Installer perhaps?
marco4net