我有一些自定义操作,我只想在升级方案中执行.
我正在尝试设置一些属性,例如"MYPROPERTY"......当我通过标准安装进入时,我可以设置它们,并且该XML的示例如下...
<Custom Action="SetMyPropertyToOn" After="exampleActionRuuningBeforeThisOne"> (ENABLEMYPROPERTY_CB) AND (NOT ENABLEMYPROPERTY_CB="0") AND (NOT ENABLEMYPROPERTY) AND (NOT Installed)</Custom>
Run Code Online (Sandbox Code Playgroud)
它在正常安装中运行...我也希望它在升级方案中运行.
Nat*_*arr 23
我在所有设置中都使用它:
<SetProperty After="FindRelatedProducts" Id="FirstInstall" Value="true">
NOT Installed AND NOT WIX_UPGRADE_DETECTED AND NOT WIX_DOWNGRADE_DETECTED
</SetProperty>
<SetProperty After="SetFirstInstall" Id="Upgrading" Value="true">
WIX_UPGRADE_DETECTED AND NOT (REMOVE="ALL")
</SetProperty>
<SetProperty After="RemoveExistingProducts" Id="RemovingForUpgrade" Sequence="execute" Value="true">
(REMOVE="ALL") AND UPGRADINGPRODUCTCODE
</SetProperty>
<SetProperty After="SetUpgrading" Id="Uninstalling" Value="true">
Installed AND (REMOVE="ALL") AND NOT (WIX_UPGRADE_DETECTED OR UPGRADINGPRODUCTCODE)
</SetProperty>
<SetProperty After="SetUninstalling" Id="Maintenance" Value="true">
Installed AND NOT Upgrading AND NOT Uninstalling AND NOT UPGRADINGPRODUCTCODE
</SetProperty>
Run Code Online (Sandbox Code Playgroud)
然后,您可以将自定义操作安排为仅在升级时运行:
<Custom Action="NameOfCustomAction" Before="InstallFinalize"><![CDATA[Upgrading= "true"]]></Custom>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5064 次 |
| 最近记录: |