This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: MSI parameters to uninstall old package during major upgrades ?
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Dec 14, 2015
07:22 AM
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
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
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Dec 14, 2015
09:41 AM
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
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
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)