Skip to content

Commit

Permalink
msi: try to stop service during upgrade
Browse files Browse the repository at this point in the history
Signed-off-by: Kentaro Hayashi <hayashi@clear-code.com>
  • Loading branch information
kenhys committed Jun 20, 2023
1 parent 57e03de commit 6fcce12
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions fluent-package/msi/source.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,17 @@
<WixVariable Id="WixUIInfoIco" Value="assets\icon.ico" />

<!-- Settle paths in executables generated by RubyGems -->
<Property Id="PostStopFluentdService" Value=" "/>
<CustomAction Id="SetStopFluentdService"
Property="PostStopFluentdService"
Value="&quot;cmd&quot; /c &quot;sc stop fluentdwinsvc&quot;"/>
<CustomAction Id="PostStopFluentdService"
BinaryKey="WixCA"
DllEntry="WixQuietExec64"
Execute="deferred"
Return="check"
Impersonate="no" />

<Property Id="PostInstall" Value=" "/>
<CustomAction Id="SetPostInstallCommand"
Property="PostInstall"
Expand Down Expand Up @@ -217,6 +228,9 @@
Impersonate="no" />

<InstallExecuteSequence>
<Custom Action="SetStopFluentdService" Before="PostInstall">NOT Installed AND WIX_UPGRADE_DETECTED</Custom>
<Custom Action="PostStopFluentdService" After="SetStopFluentdService">NOT Installed AND WIX_UPGRADE_DETECTED</Custom>

<Custom Action="SetPostInstallCommand" After="InstallFiles">NOT Installed</Custom>
<Custom Action="PostInstall" After="SetPostInstallCommand">NOT Installed</Custom>
<Custom Action="SetInstallFluentdWinSvcCommand" After="InstallFiles">NOT Installed</Custom>
Expand Down

0 comments on commit 6fcce12

Please sign in to comment.