Refactor Windows MSI installer configuration for improved uninstall handling
Some checks failed
farmcontrol/farmcontrol-ui/pipeline/head There was a failure building this commit

- Updated custom actions in the MSI wrapped configuration to use a unified property for command line execution.
- Simplified the install sequence by adjusting conditions for running the installer and uninstalling previous versions.
- Enhanced clarity and maintainability of the installer script.
This commit is contained in:
Tom Butcher 2026-08-02 02:53:46 +01:00
parent b1ca3818e3
commit f59000778e

View File

@ -81,19 +81,19 @@
<CustomAction
Id="SetKillFarmControl"
Property="QtKillFarmControl"
Property="QtExecCmdLine"
Value="taskkill.exe /F /IM launcher.exe /T"
Execute="immediate" />
<CustomAction
Id="SetUninstallPreviousFromRegistry"
Property="QtUninstallPrevious"
Property="QtExecCmdLine"
Value="&quot;[PREVIOUS_UNINSTALL_CMD]&quot; /S"
Execute="immediate" />
<CustomAction
Id="SetUninstallPreviousFromInstallDir"
Property="QtUninstallPrevious"
Property="QtExecCmdLine"
Value="&quot;[PREVIOUS_INSTALL_DIR]Uninstall.exe&quot; /S"
Execute="immediate" />
@ -102,10 +102,8 @@
<Custom Action="KillFarmControl" After="SetKillFarmControl">NOT Installed</Custom>
<Custom Action="SetUninstallPreviousFromRegistry" After="KillFarmControl">NOT Installed AND PREVIOUS_UNINSTALL_CMD</Custom>
<Custom Action="SetUninstallPreviousFromInstallDir" After="KillFarmControl">NOT Installed AND NOT PREVIOUS_UNINSTALL_CMD AND PREVIOUS_INSTALL_DIR</Custom>
<Custom Action="UninstallPrevious" After="SetUninstallPreviousFromRegistry">NOT Installed AND (PREVIOUS_UNINSTALL_CMD OR PREVIOUS_INSTALL_DIR)</Custom>
<Custom Action="UninstallPrevious" After="SetUninstallPreviousFromInstallDir">NOT Installed AND (PREVIOUS_UNINSTALL_CMD OR PREVIOUS_INSTALL_DIR)</Custom>
<Custom Action="RunInstaller" After="UninstallPrevious">NOT Installed AND (PREVIOUS_UNINSTALL_CMD OR PREVIOUS_INSTALL_DIR)</Custom>
<Custom Action="RunInstaller" After="KillFarmControl">NOT Installed AND NOT PREVIOUS_UNINSTALL_CMD AND NOT PREVIOUS_INSTALL_DIR</Custom>
<Custom Action="RunInstaller" After="UninstallPrevious">NOT Installed</Custom>
</InstallExecuteSequence>
</Product>
</Wix>