2015-11-20 55 views
0

下面是我的代碼,當我嘗試安裝我的MSI時,它執行了所有操作,但下面的行顯示沒有執行跡象。無法在WiX腳本中執行命令

   <Binary Id="unzipExeId" SourceFile="unzip.exe"/> 
       <Property Id="WixQuietExec64CmdLine" Value="[#$(var.InstallationLocation)\unzip.exe]"/> 
       <CustomAction Id="unzipAction" BinaryKey="unzipExeId" DllEntry="WixQuietExec64" Execute='deferred' Return ='asyncWait' Impersonate='no'/> 
       <InstallExecuteSequence> 
        <Custom Action='unzipAction' Before='InstallFinalize'/> 
       </InstallExecuteSequence> 

我錯過了什麼。

但是當我嘗試此代碼

   <Binary Id="unzipExeId" SourceFile="unzip.exe"/> 
       <CustomAction Id="unzipAction" BinaryKey="unzipExeId" ExeCommand="START /B unzip.exe" Execute='deferred' Return ='asyncWait' Impersonate='no'/> 
       <InstallExecuteSequence> 
        <Custom Action='unzipAction' Before='InstallFinalize'/> 
       </InstallExecuteSequence> 

一切都工作得很好,但包含unzip.exe的執行機器導致彈出。這個exe並沒有默默安裝。但我需要默默執行EXE。 預先感謝

回答

1

它可能與DllEntry相關,而不是使用「WixQuietExec64」嘗試使用「CAWixQuietExec64」。

這是一個懸而未決的問題。 http://wixtoolset.org/issues/4802/

這是作爲共同使用:

<CustomAction Id="CA_RunBatchScript" 
       BinaryKey="WixCA" 
       DllEntry="CAQuietExec" 
       Execute="deferred" 
       Return="check" /> 
+0

我用的DLL CAQuietExec和CAWixQuietExec64。在安裝時都表示「這個Windows安裝程序包存在問題無法運行此安裝所需的DLL。請聯繫您的支持人員或包供應商」 –

+0

https://www.firegiant.com/wix/tutorial/標準庫/沉默 - 請/ 這是我興奮地做了與你所提到的相同,但仍然有exe未觸發 –