Skip to content

Commit

Permalink
fix(bundler): properly reinstall files on MSI downgrades, closes #3868 (
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog committed May 4, 2022
1 parent 95726eb commit 72e577d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changes/fix-windows-downgrades.md
@@ -0,0 +1,5 @@
---
"tauri-bundler": patch
---

Fix app downgrades when using the Windows installer.
6 changes: 5 additions & 1 deletion tooling/bundler/src/bundle/windows/templates/main.wxs
Expand Up @@ -25,8 +25,12 @@
InstallScope="perMachine"
SummaryCodepage="!(loc.TauriCodepage)"/>

<!-- https://docs.microsoft.com/en-us/windows/win32/msi/reinstallmode -->
<!-- force all files to be reinstalled; rewrite all registry entries; reinstall all shortcuts -->
<Property Id="REINSTALLMODE" Value="amus" />

{{#if allow_downgrades}}
<MajorUpgrade AllowDowngrades="yes" />
<MajorUpgrade AllowDowngrades="yes" Schedule="afterInstallInitialize" />
{{else}}
<MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeErrorMessage)" AllowSameVersionUpgrades="yes" />
{{/if}}
Expand Down

0 comments on commit 72e577d

Please sign in to comment.