|
45 | 45 | Property="OLDERVERSIONBEINGUPGRADED" /> |
46 | 46 | </Upgrade> |
47 | 47 |
|
| 48 | + <Media Id="1" Cabinet="windows_exporter.cab" EmbedCab="yes" /> |
| 49 | + <MajorUpgrade Schedule="afterInstallInitialize" DowngradeErrorMessage="A later version of [ProductName] is already installed. Setup will now exit." AllowSameVersionUpgrades="yes" /> |
| 50 | + |
| 51 | + <Property Id="ENABLED_COLLECTORS" Secure="yes" /> |
| 52 | + <SetProperty Id="CollectorsFlag" After="InstallFiles" Sequence="execute" Value="--collectors.enabled [ENABLED_COLLECTORS]" Condition="ENABLED_COLLECTORS" /> |
| 53 | + |
| 54 | + <Property Id="EXTRA_FLAGS" Secure="yes" /> |
| 55 | + <SetProperty Id="ExtraFlags" After="InstallFiles" Sequence="execute" Value="[EXTRA_FLAGS]" Condition="EXTRA_FLAGS" /> |
| 56 | + |
| 57 | + <Property Id="CONFIG_FILE" Secure="yes" Value="config.yaml" /> |
| 58 | + <SetProperty Id="ConfigFile_NonDefault" After="InstallFiles" Sequence="execute" Value="[CONFIG_FILE]" Condition="CONFIG_FILE AND CONFIG_FILE<>"config.yaml"" /> |
| 59 | + <SetProperty Id="ConfigFile_Default" After="InstallFiles" Sequence="execute" Value="[APPLICATIONFOLDER]config.yaml" Condition="CONFIG_FILE="config.yaml"" /> |
| 60 | + <SetProperty Id="ConfigFileFlag" After="InstallFiles" Sequence="execute" Value="--config.file="[ConfigFile_NonDefault][ConfigFile_Default]"" Condition="ConfigFile_NonDefault OR ConfigFile_Default" /> |
| 61 | + |
| 62 | + <Property Id="LISTEN_PORT" Secure="yes" Value="9182" /> |
| 63 | + <SetProperty Id="ListenFlag" After="InstallFiles" Sequence="execute" Value="--web.listen-address="[LISTEN_ADDR]:[LISTEN_PORT]"" Condition="LISTEN_ADDR<>"" OR LISTEN_PORT<>9182" /> |
| 64 | + |
| 65 | + <Property Id="METRICS_PATH" Secure="yes" /> |
| 66 | + <SetProperty Id="MetricsPathFlag" After="InstallFiles" Sequence="execute" Value="--telemetry.path="[METRICS_PATH]"" Condition="METRICS_PATH" /> |
| 67 | + |
| 68 | + <Property Id="REMOTE_ADDR" Secure="yes" /> |
| 69 | + <SetProperty Id="RemoteAddressFlag" After="InstallFiles" Sequence="execute" Value="[REMOTE_ADDR]" Condition="REMOTE_ADDR" /> |
| 70 | + |
| 71 | + <Property Id="TEXTFILE_DIRS" Secure="yes" /> |
| 72 | + <SetProperty Id="TextfileDirsFlag" After="InstallFiles" Sequence="execute" Value="--collector.textfile.directories="[TEXTFILE_DIRS]"" Condition="TEXTFILE_DIRS" /> |
| 73 | + |
| 74 | + <Property Id="ARPHELPLINK" Value="https://github.com/prometheus-community/windows_exporter/issues" /> |
| 75 | + <Property Id="ARPSIZE" Value="9000" /> |
| 76 | + <Property Id="ARPURLINFOABOUT" Value="https://github.com/prometheus-community/windows_exporter" /> |
| 77 | + <!--<Property Id="ARPNOMODIFY" Value="0" />--> |
| 78 | + <!--<Property Id="ARPNOREPAIR" Value="1" />--> |
| 79 | + <Property Id="START_MENU_FOLDER" Value="0" /> |
| 80 | + <Property Id="NOSTART" Value="0" /> |
| 81 | + |
48 | 82 | <CustomAction Id="CheckExtraFlags" |
49 | 83 | Error="The parameter '--config.file' must not be included in EXTRA_FLAGS. Use CONFIG_FILE instead. Please remove it and try again." /> |
50 | 84 |
|
|
100 | 134 | Condition="Installed AND (NOT REMOVE) AND (NOT UPGRADINGPRODUCTCODE)"/> |
101 | 135 | <Custom Action="set_reinstall_all_property" Before="set_reinstallmode_property" Condition="MAINTENANCE"/> |
102 | 136 | <Custom Action="set_reinstallmode_property" Before="LaunchConditions" Condition="MAINTENANCE"/> |
103 | | - <Custom Action="CreateConfigFile" Before="InstallServices" Condition="ConfigFile_NonDefault OR ConfigFile_Default" /> |
| 137 | + <Custom Action="CreateConfigFile" Before="InstallServices" Condition="ConfigFile_Default" /> |
104 | 138 | <Custom Action="KillProcess" Before="RemoveFiles" /> |
105 | 139 |
|
106 | 140 | <Custom Action="CheckExtraFlags" Before="InstallInitialize" |
107 | 141 | Condition="EXTRA_FLAGS AND (EXTRA_FLAGS><"--config.file")" /> |
108 | 142 | </InstallExecuteSequence> |
109 | 143 |
|
110 | | - <Media Id="1" Cabinet="windows_exporter.cab" EmbedCab="yes" /> |
111 | | - <MajorUpgrade Schedule="afterInstallInitialize" DowngradeErrorMessage="A later version of [ProductName] is already installed. Setup will now exit." AllowSameVersionUpgrades="yes" /> |
112 | | - |
113 | | - <Property Id="ENABLED_COLLECTORS" Secure="yes" /> |
114 | | - <SetProperty Id="CollectorsFlag" After="InstallFiles" Sequence="execute" Value="--collectors.enabled [ENABLED_COLLECTORS]" Condition="ENABLED_COLLECTORS" /> |
115 | | - |
116 | | - <Property Id="EXTRA_FLAGS" Secure="yes" /> |
117 | | - <SetProperty Id="ExtraFlags" After="InstallFiles" Sequence="execute" Value="[EXTRA_FLAGS]" Condition="EXTRA_FLAGS" /> |
118 | | - |
119 | | - <Property Id="CONFIG_FILE" Secure="yes" Value="config.yaml" /> |
120 | | - <SetProperty Id="ConfigFile_NonDefault" After="InstallFiles" Sequence="execute" Value="[CONFIG_FILE]" Condition="CONFIG_FILE AND CONFIG_FILE<>"config.yaml"" /> |
121 | | - <SetProperty Id="ConfigFile_Default" After="InstallFiles" Sequence="execute" Value="[APPLICATIONFOLDER]config.yaml" Condition="CONFIG_FILE="config.yaml"" /> |
122 | | - <SetProperty Id="ConfigFileFlag" After="InstallFiles" Sequence="execute" Value="--config.file="[ConfigFile_NonDefault][ConfigFile_Default]"" Condition="ConfigFile_NonDefault OR ConfigFile_Default" /> |
123 | | - |
124 | | - <Property Id="LISTEN_PORT" Secure="yes" Value="9182" /> |
125 | | - <SetProperty Id="ListenFlag" After="InstallFiles" Sequence="execute" Value="--web.listen-address="[LISTEN_ADDR]:[LISTEN_PORT]"" Condition="LISTEN_ADDR<>"" OR LISTEN_PORT<>9182" /> |
126 | | - |
127 | | - <Property Id="METRICS_PATH" Secure="yes" /> |
128 | | - <SetProperty Id="MetricsPathFlag" After="InstallFiles" Sequence="execute" Value="--telemetry.path="[METRICS_PATH]"" Condition="METRICS_PATH" /> |
129 | | - |
130 | | - <Property Id="REMOTE_ADDR" Secure="yes" /> |
131 | | - <SetProperty Id="RemoteAddressFlag" After="InstallFiles" Sequence="execute" Value="[REMOTE_ADDR]" Condition="REMOTE_ADDR" /> |
132 | | - |
133 | | - <Property Id="TEXTFILE_DIRS" Secure="yes" /> |
134 | | - <SetProperty Id="TextfileDirsFlag" After="InstallFiles" Sequence="execute" Value="--collector.textfile.directories="[TEXTFILE_DIRS]"" Condition="TEXTFILE_DIRS" /> |
135 | | - |
136 | | - <Property Id="ARPHELPLINK" Value="https://github.com/prometheus-community/windows_exporter/issues" /> |
137 | | - <Property Id="ARPSIZE" Value="9000" /> |
138 | | - <Property Id="ARPURLINFOABOUT" Value="https://github.com/prometheus-community/windows_exporter" /> |
139 | | - <!--<Property Id="ARPNOMODIFY" Value="0" />--> |
140 | | - <!--<Property Id="ARPNOREPAIR" Value="1" />--> |
141 | | - <Property Id="START_MENU_FOLDER" Value="0" /> |
142 | | - <Property Id="NOSTART" Value="0" /> |
143 | | - |
144 | 144 | <Feature |
145 | 145 | Id="DefaultFeature" |
146 | 146 | Level="1" |
|
0 commit comments