mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-26 06:36:36 +00:00
installer: force close application on uninstall (#1854)
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
@@ -54,12 +54,12 @@
|
|||||||
<CustomAction Id="set_reinstallmode_property"
|
<CustomAction Id="set_reinstallmode_property"
|
||||||
Property="REINSTALLMODE"
|
Property="REINSTALLMODE"
|
||||||
Value="amus" />
|
Value="amus" />
|
||||||
|
<!-- START CUSTOM ACTION FOR CONFIG FILE CREATION -->
|
||||||
<SetProperty
|
<SetProperty
|
||||||
Id="CreateConfigFile"
|
Id="CreateConfigFile"
|
||||||
Value=""[%ComSpec]" /c TYPE NUL >>"[ConfigFile_NonDefault][ConfigFile_Default]""
|
Value=""[%ComSpec]" /c TYPE NUL >>"[ConfigFile_NonDefault][ConfigFile_Default]""
|
||||||
Before="CreateConfigFile"
|
Before="CreateConfigFile"
|
||||||
Sequence="execute"
|
Sequence="execute"
|
||||||
Condition="ConfigFile_NonDefault OR ConfigFile_Default"
|
|
||||||
/>
|
/>
|
||||||
<CustomAction
|
<CustomAction
|
||||||
Id="CreateConfigFile"
|
Id="CreateConfigFile"
|
||||||
@@ -69,6 +69,24 @@
|
|||||||
Return="check"
|
Return="check"
|
||||||
Impersonate="no"
|
Impersonate="no"
|
||||||
/>
|
/>
|
||||||
|
<!-- END CUSTOM ACTION FOR CONFIG FILE CREATION -->
|
||||||
|
|
||||||
|
<!-- START CUSTOM ACTION FOR KILLING THE PROCESS -->
|
||||||
|
<SetProperty
|
||||||
|
Id="KillProcess"
|
||||||
|
Value=""[WindowsFolder]\System32\taskkill.exe" /T /F /IM windows_exporter.exe"
|
||||||
|
Before="KillProcess"
|
||||||
|
Sequence="execute"
|
||||||
|
/>
|
||||||
|
<CustomAction
|
||||||
|
Id="KillProcess"
|
||||||
|
BinaryRef="Wix4UtilCA_$(sys.BUILDARCHSHORT)"
|
||||||
|
DllEntry="WixQuietExec"
|
||||||
|
Execute="deferred"
|
||||||
|
Return="ignore"
|
||||||
|
Impersonate="no"
|
||||||
|
/>
|
||||||
|
<!-- END CUSTOM ACTION FOR KILLING THE PROCESS -->
|
||||||
|
|
||||||
<InstallExecuteSequence>
|
<InstallExecuteSequence>
|
||||||
<!-- Set REINSTALL=all and REINSTALLMODE=amus if the user reruns the
|
<!-- Set REINSTALL=all and REINSTALLMODE=amus if the user reruns the
|
||||||
@@ -78,6 +96,7 @@
|
|||||||
<Custom Action="set_reinstall_all_property" Before="set_reinstallmode_property" Condition="MAINTENANCE"/>
|
<Custom Action="set_reinstall_all_property" Before="set_reinstallmode_property" Condition="MAINTENANCE"/>
|
||||||
<Custom Action="set_reinstallmode_property" Before="LaunchConditions" Condition="MAINTENANCE"/>
|
<Custom Action="set_reinstallmode_property" Before="LaunchConditions" Condition="MAINTENANCE"/>
|
||||||
<Custom Action="CreateConfigFile" Before="InstallServices" Condition="ConfigFile_NonDefault OR ConfigFile_Default" />
|
<Custom Action="CreateConfigFile" Before="InstallServices" Condition="ConfigFile_NonDefault OR ConfigFile_Default" />
|
||||||
|
<Custom Action="KillProcess" Before="RemoveFiles" />
|
||||||
</InstallExecuteSequence>
|
</InstallExecuteSequence>
|
||||||
|
|
||||||
<Media Id="1" Cabinet="windows_exporter.cab" EmbedCab="yes" />
|
<Media Id="1" Cabinet="windows_exporter.cab" EmbedCab="yes" />
|
||||||
|
|||||||
Reference in New Issue
Block a user