Change upgrade phase

With afterInstallExecute, the old installation is only removed after the new one is finished, which has led to some users seeing the new version failing to start, leading to the install rolling back. afterInstallInitialize, in contrast, uninstalls before the new installation.

Signed-off-by: Calle Pettersson <carlpett@users.noreply.github.com>
This commit is contained in:
Calle Pettersson 2020-09-12 16:37:32 +02:00
parent 922c08b85b
commit d39d5230ab
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@
<Package Id="*" Manufacturer="prometheus-community" InstallScope="perMachine"
Description="windows_exporter $(var.Version) installer" Compressed="yes" />
<Media Id="1" Cabinet="windows_exporter.cab" EmbedCab="yes"/>
<MajorUpgrade Schedule="afterInstallExecute" DowngradeErrorMessage="A later version of [ProductName] is already installed. Setup will now exit." />
<MajorUpgrade Schedule="afterInstallInitialize" DowngradeErrorMessage="A later version of [ProductName] is already installed. Setup will now exit." />
<Property Id="ENABLED_COLLECTORS" Secure="yes"/>
<SetProperty Id="CollectorsFlag" After="InstallFiles" Sequence="execute" Value="--collectors.enabled [ENABLED_COLLECTORS]">ENABLED_COLLECTORS</SetProperty>