繁体   English   中英

EXE作为自定义操作在安装过程中运行时,安装程​​序正在等待

[英]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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM