0

我想执行我的批处理文件,它需要 3 个 cmd 行参数,它应该在其中执行静默模式[不应该看到控制台]。下面是我的 wix 代码:

    <CustomAction Id="ScrptsMngr" Property= "PrptyScrptsMngr"
              Value="&quot;[#filC22B3172A663C01F17B8CE4D55CB7DE2]&quot; [ARG1] [ARG2] [ARG3]" Execute="immediate"/>
               <CustomAction Id="PrptyScrptsMngr" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" Return="asyncWait" Impersonate="yes"/>

上述自定义操作对我不起作用。由于 CAQuietExec 执行失败,它总是抛出错误。我的自定义操作是否正确

4

1 回答 1

-1

尝试为每个 ARG1/2/3 添加“ (”) 并尝试。还要确保在 product.wxs seqeunce 中的“ScrptsMngr”之后设置了“PrptyScrptsMngr”调用

<CustomAction Id="QtCmdLineRmDummies" Property="QtExecCmdLine"Value="&quot;[SystemFolder]cmd.exe&quot; /c del /Q &quot;[INSTALLLOCATION]\dummy*.*&quot;" />
<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>
于 2012-09-15T18:30:43.790 回答