mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-07 21:46:37 +00:00
installer: set failureflag for Windows service (#2191)
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -6,6 +6,7 @@ output/
|
|||||||
.vscode
|
.vscode
|
||||||
*.syso
|
*.syso
|
||||||
installer/*.msi
|
installer/*.msi
|
||||||
|
installer/*.log
|
||||||
installer/*.wixpdb
|
installer/*.wixpdb
|
||||||
local/
|
local/
|
||||||
|
|
||||||
|
|||||||
@@ -127,6 +127,23 @@
|
|||||||
/>
|
/>
|
||||||
<!-- END CUSTOM ACTION FOR KILLING THE PROCESS -->
|
<!-- END CUSTOM ACTION FOR KILLING THE PROCESS -->
|
||||||
|
|
||||||
|
<!-- START CUSTOM ACTION FOR SET SERVICE FAILUREFLAG -->
|
||||||
|
<SetProperty
|
||||||
|
Id="ConfigureServiceRecovery"
|
||||||
|
Value=""[WindowsFolder]System32\sc.exe" failureflag "windows_exporter" 1"
|
||||||
|
Before="ConfigureServiceRecovery"
|
||||||
|
Sequence="execute"
|
||||||
|
/>
|
||||||
|
<CustomAction
|
||||||
|
Id="ConfigureServiceRecovery"
|
||||||
|
BinaryRef="Wix4UtilCA_$(sys.BUILDARCHSHORT)"
|
||||||
|
DllEntry="WixQuietExec"
|
||||||
|
Execute="deferred"
|
||||||
|
Return="ignore"
|
||||||
|
Impersonate="no"
|
||||||
|
/>
|
||||||
|
<!-- END CUSTOM ACTION FFOR SET SERVICE FAILUREFLAG -->
|
||||||
|
|
||||||
<InstallExecuteSequence>
|
<InstallExecuteSequence>
|
||||||
<!-- Set REINSTALL=all and REINSTALLMODE=amus if the user reruns the
|
<!-- Set REINSTALL=all and REINSTALLMODE=amus if the user reruns the
|
||||||
MSI, which will force reinstalling all files and services. -->
|
MSI, which will force reinstalling all files and services. -->
|
||||||
@@ -135,6 +152,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_Default" />
|
<Custom Action="CreateConfigFile" Before="InstallServices" Condition="ConfigFile_Default" />
|
||||||
|
<Custom Action="ConfigureServiceRecovery" After="InstallServices" Condition="NOT REMOVE" />
|
||||||
<Custom Action="KillProcess" Before="RemoveFiles" />
|
<Custom Action="KillProcess" Before="RemoveFiles" />
|
||||||
|
|
||||||
<Custom Action="CheckExtraFlags" Before="InstallInitialize"
|
<Custom Action="CheckExtraFlags" Before="InstallInitialize"
|
||||||
|
|||||||
Reference in New Issue
Block a user