如何在WIX

时间:2016-08-25 16:46:11

标签: wix

我在WIX A和B中有2个自定义操作

我需要B才能在A完成后执行。

A是外部exe,B是一组配置A的命令,因此不能在A之前执行。

目前我定义了两个自定义操作:

<CustomAction Id='install_exe_action' FileKey='exe'  Execute='deferred' Return='check'  ExeCommand=' --flags 1'/> 

<CustomAction Id='start_service_controller_action' FileKey='exe_service_controller_exe' Impersonate='no' ExeCommand=' /install ' Execute='deferred' Return='check' />

然后我有2个InstallExecuteSequence部分,如:

<InstallExecuteSequence>
    <Custom Action='install_exe_action' After='InstallFiles'> NOT Installed AND NOT REMOVE </Custom> 
</InstallExecuteSequence>  


<InstallExecuteSequence>
    <Custom Action='start_service_controller_action' After='InstallFiles'> NOT Installed AND NOT REMOVE </Custom> 
</InstallExecuteSequence>  

如何让start_service_controler_action仅在install_exe_action之后发生?

谢谢!

1 个答案:

答案 0 :(得分:4)

<InstallExecuteSequence>
  <Custom Action='install_exe_action' After='InstallFiles'> NOT Installed AND NOT REMOVE </Custom> 
  <Custom Action='start_service_controller_action' After='install_exe_action'> NOT Installed AND NOT REMOVE </Custom> 
</InstallExecuteSequence>