如何在wix安装过程中执行exe

问题描述 投票:0回答:2
<CustomAction Id="RegisterEXE" Directory="INSTALLDIR" ExeCommand="&quot;INSTALLDIR]MyApp.exe&quot; /Register" Execute="immediate" Return="ignore" />   
<InstallExecuteSequence>
  <Custom Action='RegisterEXE' After='InstallFinalize' />
</InstallExecuteSequence>

我用过这个代码 但它不执行exe。 Exe 将自身注册为 ole 服务器并执行一些其他任务。

wix installation wix3.7
2个回答
16
投票

用这个

<CustomAction Id="RegisterEXE"
                  Directory="INSTALLDIR"
                  ExeCommand="&quot;[INSTALLDIR]TKW5.exe&quot; /Register"
                  Execute="deferred"
                  Return="ignore"  
                  Impersonate="no"
                 />

<InstallExecuteSequence>
      <Custom Action='RegisterEXE' After='InstallFiles' />
</InstallExecuteSequence>

0
投票

它也像这样工作。

  <CustomAction Id="RegisterEXE"
                  Directory="INSTALLFOLDER"
                  ExeCommand="&quot;[INSTALLFOLDER]DesktopAlertingClient.exe&quot;"
                  Execute="immediate"
                  Return="asyncNoWait"  
                  Impersonate="no"
                 />

      <InstallExecuteSequence>
            <Custom Action='RegisterEXE' After='InstallFinalize'></Custom>
      </InstallExecuteSequence>
© www.soinside.com 2019 - 2024. All rights reserved.