我正在尝试在安装后执行exe。以下是我尝试这样做的方法。
<Property Id="WixShellExecTarget" Value="[#fil7D28AEF774656849395A2FA20A5C963D]" />
<CustomAction Id="LaunchMosquitto" BinaryKey="WixCA" DllEntry="WixShellExec" Impersonate="yes" />
<InstallExecuteSequence>
<Custom Action="LaunchMosquitto" After="InstallFinalize" />
</InstallExecuteSequence>
在这里,[#fil7D28AEF774656849395A2FA20A5C963D]是指文件ID。我需要使用参数&#34;运行此exe。 -c config.conf&#34;。我怎样才能做到这一点?任何帮助将非常感激。我需要在没有启动命令提示的情况下发生这种情况。
回答后记录:
MSI (s) (D0:24) [18:32:16:273]: Executing op: ActionStart(Name=LaunchMosquitto,,)
MSI (s) (D0:24) [18:32:16:273]: Executing op: CustomActionSchedule(Action=LaunchMosquitto,ActionType=3137,Source=BinaryData,Ta rget=WixQuietExec64,CustomActionData="C:\Kube2.0\Mosquitto\mosquitto.exe" -c C:\Kube2.0\Mosquitto\mosquitto.conf)
答案 0 :(得分:0)
正如严建议您应该使用安静的CA.
<SetProperty Id="LaunchMosquitto" Value=""[#fil7D28AEF774656849395A2FA20A5C963D]" -c config.conf" Before="LaunchMosquitto" Sequence="execute"/>
<CustomAction Id="LaunchMosquitto"
BinaryKey="WixCA"
DllEntry="WixQuietExec64"
Execute="deferred"
Return="check"
Impersonate="no"/>
<InstallExecuteSequence>
<Custom Action="LaunchMosquitto" Before="InstallFinalize" />
</InstallExecuteSequence>