WiX CAQuietExec CustomAction останавливает установку

У меня есть установка WiX Burn с цепочкой пакетов.

Обновления запускаются в пассивном режиме и не требуют вмешательства пользователя.

Последний пакет запускается только при обновлении, и единственная цель - запустить исполняемый файл, что он делает с помощью следующего кода:

<!-- Quiet Execution Deferred execution with qtExec-->
<Property Id="QtExecDeferredExample" Value="&quot;C:\Program Files (x86)\Acme Inc\MyApp.exe&quot;"/>
<CustomAction Id="QtExecDeferredExample" BinaryKey="WixCA" DllEntry="CAQuietExec"
              Execute="deferred" Return="ignore" Impersonate="no"/>

<InstallExecuteSequence>
  <Custom Action="QtExecDeferredExample" Before="InstallFinalize"/>
</InstallExecuteSequence>

Однако, хотя MyApp.exe запускается, установка не завершится, пока MyApp.exe не завершится. Очевидно, я хочу, чтобы приложение запустилось, а установщик завершил свою работу.

Я не могу изменить CustomAction для запуска после завершения установки ..

<Custom Action="QtExecDeferredExample" After="InstallFinalize"/>

По следующим причинам:

ICE77: QtExecDeferredExample is a in-script custom action.  
It must be sequenced in between the InstallInitialize action and the InstallFinalize action in the InstallExecuteSequence table

Любые идеи приветствуются.

Обновление: ответ Брайана Джей привел меня к ответу. Как запросил @escist, соответствующая часть моего ЦС выглядит следующим образом:

    <!-- CA To set the property of the process to start-->
    <CustomAction
              Id        ="SetProcessToStart"
              BinaryKey ="WiXCustomActions"
              DllEntry  ="GetProcessToStart"
              Execute   ="immediate" />

    <!-- CA to start the process-->
    <CustomAction
              Id         ="StartApp"
              Directory  ="APPLICATIONROOTDIRECTORY"
              ExeCommand ="[PROCESSTOSTART]"
              Execute    ="deferred"
              Return     ="asyncNoWait"/>

  </Fragment>
</Wix>

и в другом месте (есть несколько моих приложений, которые могли запустить этот процесс, поэтому путь к ним хранится в реестре) ..

<Property Id="PROCESSTOSTART">[Not Set]</Property>
<InstallExecuteSequence>
  <!-- Use our Custom Action to set the PROCESSTOSTART property-->
  <!-- Custom Action to get the value from registry of the App that started the bootstrapper-->
  <Custom Action="SetProcessToStart" Before="LaunchConditions">NOT Installed</Custom>

  <!-- NOT installed ensures that the CA does not get fired on an uninstall -->
  <Custom Action="StartApp" Before="InstallFinalize">NOT Installed</Custom>
</InstallExecuteSequence>

person Fetchez la vache    schedule 22.10.2012    source источник
comment
Не могли бы вы найти решение этой проблемы?   -  person escist    schedule 23.04.2014


Ответы (1)


Измените значение «Возврат» в настраиваемом действии на Return="asyncNoWait".

person BryanJ    schedule 22.10.2012
comment
Это вызывает ошибку компиляции, например The CustomAction/@Return attribute's value, 'asyncNoWait', cannot be specified without attribute ExeCommand present. - person escist; 23.04.2014
comment
Немного поздно отмечать это как ответ, так что извиняюсь. @escist - обновит мой исходный вопрос с помощью моего рабочего настраиваемого действия. - person Fetchez la vache; 23.04.2014