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
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.
Eg
<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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.