Skip to content

Commit eb51746

Browse files
authored
[Packaging] Optimize MSI upgrade performance by simplifying file replacement logic (#32678)
1 parent 3d740e3 commit eb51746

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

build_scripts/windows/Product.wxs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
<UpgradeVersion Property="WIX_DOWNGRADE_DETECTED" Minimum="$(var.ProductVersion)" IncludeMinimum="no" OnlyDetect="yes" />
5050
</Upgrade>
5151
<InstallExecuteSequence>
52-
<RemoveExistingProducts After="InstallExecute" />
52+
<!-- RemoveExistingProducts runs BEFORE InstallInitialize to completely remove old version first. -->
53+
<RemoveExistingProducts Before="InstallInitialize" />
5354
</InstallExecuteSequence>
5455

5556
<!-- New product architectures should upgrade the original x86 product - even of the same version. -->
@@ -74,6 +75,9 @@
7475
<Property Id="MSIFASTINSTALL" Value="7" />
7576
<Property Id="ApplicationFolderName" Value="Microsoft SDKs\Azure" />
7677
<Property Id="WixAppFolder" Value="WixPerMachineFolder" />
78+
79+
<!-- Force reinstall of all files during upgrade -->
80+
<SetProperty Id="REINSTALLMODE" Value="amus" Before="CostFinalize" Sequence="both">WIX_UPGRADE_DETECTED</SetProperty>
7781

7882
<Feature Id="ProductFeature"
7983
Title="Microsoft Azure CLI"

0 commit comments

Comments
 (0)