File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 21
21
Description =" $(var.ProductName) Installer" />
22
22
23
23
<!-- Upgrade-->
24
- <MajorUpgrade Schedule =" afterInstallInitialize"
25
- AllowDowngrades =" no"
26
- AllowSameVersionUpgrades =" no"
27
- DowngradeErrorMessage =" A newer version of $(var.ProductName) is already installed." />
24
+ <!-- Use Upgrade instead of MajorUpgrade because the latter doesn't support removing previous versions
25
+ before installing upgrades (without checking file versions)-->
26
+ <Upgrade Id =" $(var.UpgradeGuid)" />
28
27
29
28
<!-- Media-->
30
29
<Media Id =" 1" Cabinet =" NBFC.cab" EmbedCab =" yes" CompressionLevel =" high" />
83
82
84
83
<!-- Do actions-->
85
84
<InstallExecuteSequence >
85
+ <!-- Always uninstall existing products before installing updated versions
86
+ to avoid problems during up/downgrade-->
87
+ <RemoveExistingProducts Before =' InstallInitialize' />
88
+
86
89
<Custom Action =" SetInstallFolderForUninstallDriver" Before =" UninstallDriver" />
87
90
<Custom Action =" UninstallDriver" After =" DeleteServices" />
88
91
You can’t perform that action at this time.
0 commit comments