0
votes

Our installer (Let us say 'X') has fllowing custom action which will uninstall some other product (Let us say Y) after the installation of X is completed

CustomAction Id="RemoveProductY" ExeCommand="msiexec /quiet /x [PRODUCTCODEOFPRODY]" Directory="TARGETDIR" Return="asyncNoWait" Impersonate="no" Execute ="commit"

It work perfectly when I install it normally but fails only when I install it silently.

Works : msiexec /i X.msi

Fails : msiexec /qn /i X.msi

Please help me with this

1
You find out more details about the error looking at logs. msiexec /l*v log.txt /quiet /x [PRODUCTCODEOFPRODY]leshy84
I tried it but no log has been generated. That is why I doubt that the custom action itself is getting triggereduser3222952

1 Answers

0
votes

There is a more simple way to uninstall other products during installing.

Use Upgrade table, but there you specify Upgrade Code instead of Product Code.

E.g.

<Upgrade Id="{7F034BD8-2C57-437A-B528-F2554A095CF4}">
  <UpgradeVersion Property="X_PRODUCT_INSTALLED" Maximum="2.0.0" IncludeMaximum="yes" />
</Upgrade>

The product with this upgrade code and version <= 2.0.0 will be uninstalled during installation of your one.