2012-05-31 70 views
0

我有用於在IIS中設置應用程序池的命令,在安裝過程中彈出幾秒鐘的命令窗口,我不想顯示它。需要安靜地執行它。在WIX創建的安裝程序期間抑制彈出命令窗口

以下是用wix文件編寫的命令。

 
CustomAction Id="XSTAppPool32" Return="check" Directory="TARGETDIR" ExeCommand="[SystemFolder]inetsrv\appcmd set apppool /apppool.name:"XSTAppPool" /managedPipelineMode:Classic /managedRuntimeVersion:v2.0" /> 

回答

0

請參閱有關Quite Execution Custom Actions的WiX文檔。你可以嘗試下面的代碼片段。您可能需要調整屬性* QXSTAppPool32_Cmd *,因爲它包含您要運行的命令。我只是在WiX幫助中對您的問題進行了調整,但我的語法可能不完全正確。

<CustomAction Id="QXSTAppPool32_Cmd" Property="XSTAppPool32" 
       Value="&quot;[SystemFolder]inetsrv\appcmd&quot; set apppool /apppool.name:&quot;XSTAppPool&quot; /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>