sasha
Posts: 25
Joined: Fri Oct 20, 2023 8:37 pm

How to pass properties to removed product's MSI during major upgrade?

Hello,
thanks for looking at this question.

I have the following problem: how can I pass some custom properties to the MSI of a version of a product that is being upgraded?
Normally the values are obtained via user entering them in a custom dialog.
On the upgrade, they can be passed on the msiexec's command line, especially if running in the no-UI mode.

The problem is that with the UI mode, the prompt to enter the value is presented twice - first for the new version of the product, then for the old version - when it is being automatically removed. With the passive mode, the values from the command line are not passed to the old version and it fails to uninstall, because it has no required properties.

I've searched far and wide and so far, was unable to find a way to pass the properties from the new to the old. Is there any? Without this functionality simple automated upgrading of the product will not be possible, and the product may be installed on many thousands of desktops within organizations. Doing the uninstall of the old and then install of the new will result in the loss of configuration data (during upgrade we migrate the data).

Thanks!
Catalin
Posts: 6608
Joined: Wed Jun 13, 2018 7:49 am

Re: How to pass properties to removed product's MSI during major upgrade?

Hello Sasha,

Please note that the uninstall and install operations from an upgrade are basically two separate instances of Windows Installer and if you pass the properties through the command line, they will only be available to the installed MSI, not the uninstalled one as well.

A possible workaround is the one described by my colleague Eusebiu here:

Re: passing installer parameters to uninstaller during upgrade

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sasha
Posts: 25
Joined: Fri Oct 20, 2023 8:37 pm

Re: How to pass properties to removed product's MSI during major upgrade?

Thanks, Catalin. I've seen that thread. Unfortunately, modifying the old installer is not an option.
Catalin
Posts: 6608
Joined: Wed Jun 13, 2018 7:49 am

Re: How to pass properties to removed product's MSI during major upgrade?

Hello Sasha,

I'm afraid I'm not aware of any other solutions to achieve that. :(

Honestly, I don't think that is achievable.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sasha
Posts: 25
Joined: Fri Oct 20, 2023 8:37 pm

Re: How to pass properties to removed product's MSI during major upgrade?

Yeah, that's what I was afraid of :)
Thanks for your assistance.
Catalin
Posts: 6608
Joined: Wed Jun 13, 2018 7:49 am

Re: How to pass properties to removed product's MSI during major upgrade?

You are always welcome!

If you have any other questions, please let me know and I will gladly assist.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”