简体   繁体   English

WiX-静默安装无法执行自定义操作

[英]WiX - Silent Installation fails to execute custom action

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 我们的安装程序(让我们说“ X”)具有缓慢的自定义操作,它将在X的安装完成后卸载其他产品(让我们说Y)。

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

It work perfectly when I install it normally but fails only when I install it silently. 当我正常安装它时,它可以完美地工作,但是只有当我静默安装时,它才能失败。

Works : msiexec /i X.msi 作品:msiexec / i X.msi

Fails : msiexec /qn /i X.msi 失败: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. 具有此升级代码和版本<= 2.0.0的产品将在安装您的产品时被卸载。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM