请参阅有关Quite Execution Custom Actions的 WiX 文档。您可以尝试以下代码段。您可能需要调整属性 *QXSTAppPool32_Cmd* 因为它包含您要运行的命令。我刚刚根据您的问题调整了 WiX 帮助中的示例,但我的语法可能并不完全正确。
<CustomAction Id="QXSTAppPool32_Cmd" Property="XSTAppPool32"
Value=""[SystemFolder]inetsrv\appcmd" set apppool /apppool.name:"XSTAppPool" /managedPipelineMode:Classic /managedRuntimeVersion:v2.0" Execute="immediate"/>
<CustomAction Id="XSTAppPool32" BinaryKey="WixCA" DllEntry="CAQuietExec"
Execute="deferred" Return="check" Impersonate="no"/>
.
.
.
<InstallExecuteSequence>
<Custom Action="XSTAppPool32_Cmd" After="CostFinalize"/>
<Custom Action="XSTAppPool32" After="TheActionYouWantItAfter"/>
</InstallExecuteSequence>