cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Flexera beginner

MSI parameters to uninstall old package during major upgrades ?

Hi everybody,

During a major upgrade, the MSI engine call the RemoveExistingProducts action to uninstall the old package with the command line:
UPGRADINGPRODUCTCODE={GUID} CLIENTUILEVEL=0 REMOVE=ALL

Is there a way to enhance this command line with some custom MSI parameters?

I'd like to pass a CURRENTDIRECTORY property, which seems not to be initialized in the old package in this context (it generates an error in one of my old custom action...). I have no problem by uninstalling the old package manually (outside major upgrade, CURRENTDIRECTORY property is well defined).

Thanks a lot,

Adrien
Labels (1)
0 Kudos
1 Reply
Highlighted
Flexera beginner

Re: MSI parameters to uninstall old package during major upgrades ?

Hi,

I found a very simple trick by using the "Only Remove Specified Features" setting in the advanced tab of the major upgrade item.

Features listed in this setting are used in the REMOVE property of the RemoveExistingProducts command line quoted above. By the way, if you specify someting like that:
[CODE]ALL CURRENTDIRECTORY="[CURRENTDIRECTORY]"[/CODE]
The command line to uninstall the old product in the RemoveExistingProducts action becomes the following:
UPGRADINGPRODUCTCODE={GUID} CLIENTUILEVEL=0 REMOVE=ALL CURRENTDIRECTORY="Current directory from your major upgrade"

A bit fishy, but it makes the job!

Another solution could be to call a small upgrade as a prerequisite before starting the major upgrade, as described here. I haven't tested it, it would have been a little complicated in my case (the previous product had many minor upgrades).

Hope this can help!

Adrien
0 Kudos