Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CA-379341: Do not remove shortcuts unless user is uninstalling the application #3263

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions WixInstaller/XenCenter.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,12 @@
<Property Id="Install_All" Value="0" />
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />
<Property Id="ARPPRODUCTICON" Value="XenCenterICO" />
<MajorUpgrade AllowDowngrades="no" AllowSameVersionUpgrades="yes" DowngradeErrorMessage="!(loc.ErrorNewerProduct)" Schedule="afterInstallInitialize"/>
<!--
CA-379341: We use `afterInstallExecute` instead of `afterInstallInitialize` to ensure that `RemoveExistingProducts` doesn't forcibly remove shortcuts on upgrades.
Without this change, `RemoveExistingProducts` is executed before we check the conditions of `RemoveShortcuts`, which removes all shortcuts regardless of our options.
This is not ideal when upgrading between major versions (e.g.: 2023.1.0 to 2024.1.0).
-->
<MajorUpgrade AllowDowngrades="no" AllowSameVersionUpgrades="yes" DowngradeErrorMessage="!(loc.ErrorNewerProduct)" Schedule="afterInstallExecute" />
<PropertyRef Id='WIXNETFX4RELEASEINSTALLED'/>
<Condition Message="!(loc.Required_For_Installation)">
<![CDATA[Installed OR (WIXNETFX4RELEASEINSTALLED >= "#528040")]]>
Expand All @@ -220,7 +225,7 @@
<ProcessComponents Sequence="1600" />
<UnpublishFeatures Sequence="1800" />
<RemoveRegistryValues Sequence="2600" />
<RemoveShortcuts Sequence="3200" />
<RemoveShortcuts Sequence="3200">(UPGRADINGPRODUCTCODE="") AND (REMOVE="ALL")</RemoveShortcuts>
<RemoveFiles Sequence="3500" />
<InstallFiles Sequence="4000" />
<CreateShortcuts Sequence="4500" />
Expand Down
Loading