如何在Wix中向自定义操作exe添加参数? [英] How to add arguments to the custom action exe in Wix?
本文介绍了如何在Wix中向自定义操作exe添加参数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在安装后执行exe。以下是我尝试执行的操作。
I am trying to execute an exe after installation. Below is how I am trying to do this.
<Property Id="WixShellExecTarget" Value="[#fil7D28AEF774656849395A2FA20A5C963D]" />
<CustomAction Id="LaunchMosquitto" BinaryKey="WixCA" DllEntry="WixShellExec" Impersonate="yes" />
<InstallExecuteSequence>
<Custom Action="LaunchMosquitto" After="InstallFinalize" />
</InstallExecuteSequence>
在这里,[#fil7D28AEF774656849395A2FA20A5C963D]是指文件ID。我需要使用参数 -c config.conf运行此exe。我该如何实现?任何帮助将非常感激。我需要在不启动命令提示符的情况下发生这种情况。
In here, [#fil7D28AEF774656849395A2FA20A5C963D] refers to the file ID. I need to run this exe with the parameter " -c config.conf". How can I achieve this? Any help would be much appreciated. I need this to happen without a command prompt being launched.
回答后的日志:
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)
推荐答案
正如Yan所建议的,您应该使用安静的CA。
As Yan suggested you should use a quiet 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>
这篇关于如何在Wix中向自定义操作exe添加参数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文