Browse Source

fix(bundler): prevent removal of `pin to taskbar` on Windows (#4144)

Lucas Fernandes Nogueira 3 years ago
parent
commit
d965b92174

+ 5 - 0
.changes/fix-windows-upgrade.md

@@ -0,0 +1,5 @@
+---
+"tauri-bundler": patch
+---
+
+Change WiX MajorUpgrade element's `Schedule` to `afterInstallExecute` to prevent removal of existing configuration such as the executable's pin to taskbar.

+ 1 - 1
tooling/bundler/src/bundle/windows/templates/main.wxs

@@ -30,7 +30,7 @@
         <Property Id="REINSTALLMODE" Value="dmus" />
 
         {{#if allow_downgrades}}
-            <MajorUpgrade AllowDowngrades="yes" Schedule="afterInstallInitialize" />
+            <MajorUpgrade AllowDowngrades="yes" Schedule="afterInstallExecute" />
         {{else}}
             <MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeErrorMessage)" AllowSameVersionUpgrades="yes" />
         {{/if}}