[英]Installer waiting when EXE is run as custom action during installation
我正在使用WIX安裝Mosquitto,一旦文件被復制,我將嘗試使用自定義操作運行mosquitto.exe。 它啟動一個新的命令提示符,安裝在那里暫停。 僅當我終止該命令提示符時,它才會恢復。 下面是我的代碼。
<Feature Id="ProductFeature" Title="MosquittoInstaller" Level="1">
<ComponentGroupRef Id="MosquittoFilesGroup"/>
</Feature>
<InstallExecuteSequence>
<Custom Action="RunMosquitto" Before="InstallFinalize" />
</InstallExecuteSequence>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="INSTALLLOCATION">
<Directory Id="KubeInstallDir" Name="Kube2.0">
<Directory Id="MyProgramDir" Name="Mosquitto" />
</Directory>
</Directory>
</Directory>
<CustomAction Id='RunMosquitto' FileKey="fil7D28AEF774656849395A2FA20A5C963D" Execute="deferred" ExeCommand='-v' Return="check" HideTarget="no" Impersonate="no"/>
我在這里做錯了什么? 請指教。
安裝暫停是因為在您的自定義操作中,您具有Return="check"
。 有關Return屬性的更多信息,請參見CustomAction文檔 。
Return="asyncNoWait"
是您想要的。
但是, 用於在安裝后運行程序的WiX文檔顯示了另一種方式:
<Property Id="WixShellExecTarget" Value="[#myapplication.exe]" />
<CustomAction Id="LaunchApplication" BinaryKey="WixCA" DllEntry="WixShellExec" Impersonate="yes" />
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.