作为关注者的项目代码部分:
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="SetupProjectConsole" />
</Directory>
</Directory>
</Fragment>
<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<Component Id="product" Guid="69513FD8-F65A-420F-8FE8-D456890DB457">
<File Id="Run.bat" Name="Run.bat" Source="Resource\Run.bat"></File>
</Component>
</ComponentGroup>
<Property Id="QtExecDeferredExample" Value=""[INSTALLFOLDER]Run.bat""/>
<CustomAction Id="QtExecDeferredExample" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" Return="check" Impersonate="no"/>
<InstallExecuteSequence>
<Custom Action="QtExecDeferredExample" After="InstallFiles"></Custom>
</InstallExecuteSequence>
</Fragment>
但是安装日志显示为关注者:
CAQuietExec: Error 0x80070002: Command failed to execute.
CAQuietExec: Error 0x80070002: CAQuietExec Failed
CustomAction QtExecDeferredExample returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
Action ended 11:57:17: InstallFinalize. Return value 3.
但如果我用 替换[INSTALLFOLDER]
,C:\Program Files (x86)\SetupProjectConsole\
安装程序不会显示任何错误。我该如何处理这个问题?谢谢!