我想执行我的批处理文件,它需要3 cmd行参数,它应该执行静默模式[不应该看到控制台] .Below是我的wix代码:
<CustomAction Id="ScrptsMngr" Property= "PrptyScrptsMngr"
Value=""[#filC22B3172A663C01F17B8CE4D55CB7DE2]" [ARG1] [ARG2] [ARG3]" Execute="immediate"/>
<CustomAction Id="PrptyScrptsMngr" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" Return="asyncWait" Impersonate="yes"/>
上述习惯行为对我不起作用。当CAQuietExec执行失败时,它总是抛出错误。我的自定义操作是否正确
答案 0 :(得分:-1)
尝试为每个ARG1 / 2/3添加“(”)并尝试。还要确保在product.wxs seqeunce中的'ScrptsMngr'之后设置'PrptyScrptsMngr'调用
<CustomAction Id="QtCmdLineRmDummies" Property="QtExecCmdLine"Value=""[SystemFolder]cmd.exe" /c del /Q "[INSTALLLOCATION]\dummy*.*"" />
<CustomAction Id="QtCmdRmDummies" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="immediate" Return="ignore" />
在product.wxs
中<Custom Action="QtCmdLineRmDummies" After="InstallFinalize">NOT INSTALLED AND NOT REMOVE</Custom>
<Custom Action="QtCmdRmDummies" After="QtCmdLineRmDummies">NOT INSTALLED AND NOT REMOVE</Custom>