mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-01 10:01:07 +02:00
fix(bundler): swap WIX registry search order to prioritize InstallDir (#14945)
This commit is contained in:
5
.changes/fix-wix-registry-search-order.md
Normal file
5
.changes/fix-wix-registry-search-order.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri-bundler": patch:bug
|
||||
---
|
||||
|
||||
Fix WIX installer registry search order so that the named `InstallDir` key takes priority over the NSIS default key, preventing install location from changing on updates.
|
||||
@@ -70,12 +70,16 @@
|
||||
<Property Id="ARPURLUPDATEINFO" Value="{{homepage}}"/>
|
||||
{{/if}}
|
||||
|
||||
<!-- NOTE: The order of RegistrySearch elements below matters. In WIX, when multiple
|
||||
RegistrySearch elements are listed under a single Property, the LAST successful
|
||||
match wins. We list the NSIS default-key search first and the MSI InstallDir
|
||||
search second so that the MSI-specific path takes priority when both keys exist. -->
|
||||
<Property Id="INSTALLDIR">
|
||||
<!-- First attempt: Search for "InstallDir" -->
|
||||
<RegistrySearch Id="PrevInstallDirWithName" Root="HKCU" Key="Software\\{{manufacturer}}\\{{product_name}}" Name="InstallDir" Type="raw" />
|
||||
|
||||
<!-- Second attempt: If the first fails, search for the default key value (this is how the nsis installer currently stores the path) -->
|
||||
<!-- First attempt: Search for the default key value (this is how the nsis installer stores the path) -->
|
||||
<RegistrySearch Id="PrevInstallDirNoName" Root="HKCU" Key="Software\\{{manufacturer}}\\{{product_name}}" Type="raw" />
|
||||
|
||||
<!-- Second attempt: Search for "InstallDir" which takes priority if found (this is how the msi installer stores the path) -->
|
||||
<RegistrySearch Id="PrevInstallDirWithName" Root="HKCU" Key="Software\\{{manufacturer}}\\{{product_name}}" Name="InstallDir" Type="raw" />
|
||||
</Property>
|
||||
|
||||
<!-- launch app checkbox -->
|
||||
|
||||
Reference in New Issue
Block a user