-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(windows): Resolve broken installation directory handling in MSI & NSIS, preventing duplicate installations during updates #12365
base: dev
Are you sure you want to change the base?
Conversation
Add the correct key name to the install directory (InstallDir)
Package Changes Through de0cbadNo changes. Add a change file through the GitHub UI by following this link. Read about change files or the docs at github.com/jbolda/covector |
btw just a bit of context. nsis -> msi updates were never supposed to work. officially only msi -> nsis updates are/were supported (intentionally). |
Thanks for the quick response. Maybe I got this wrong. You mean, that the enduser does not initially installs the app with the But how to I enable |
Nope. First of all, 99% of apps should not ship both the msi and nsis exe but decide on one format before distributing their app. The And generally, even though cross installer updates are supported, apps shouldn't make use of that feature without good reason.
The other way around. You would enable the perMachine mode for the nsis installer. |
I am shipping (user download from homepage) currently only the nsis version with On updating the windows version, I started to see duplicated installation on the same machine. The So two version existed and the Autostart ended up starting the old version. Which of course is a mess. Maybe I am one of the few who started with distributing the nsis. Installing the IMO tauri should support both ways and it should not matter which was installed fist - otherwise this creates just confusion. Wdyt? |
Nah, nowadays that should be more common. You just made the same mistake everyone does, also shipping the msi at the same time, or at least using it in the updater - which tbf is our fault especially if you use tauri-action which prios the msi for legacy reasons.
Already said that i'm fine with that. 🤷 |
Perfect. If you are okay with the changes, than we just have to wait for @Legend-Master for his remarks regarding backwards compatibility to custom installation locations. |
The wix change is fine, but we need a changefile for tauri-bundler before we can merge this and all commits must be signed (only the first one is) |
This PR addresses an issue where the MSI updater installs the application to the default directory (
C:\Program Files\<App Name>
), even if the application was initially installed in a custom directory by NSIS, such as the user-specific path (C:\Users\<User>\AppData\Local\<App Name>
).Root Cause
The problem arises from a mismatch between NSIS and MSI in handling the installation directory path:
InstallDir
to locate the existing installation directory.Consequences
This mismatch causes MSI to fail in detecting the original installation directory during updates, resulting in two separate installations:
C:\Program Files\<App Name>
C:\Users\<User>\AppData\Local\<App Name>
Fix
This PR resolves the issue by ensuring proper handover of the installation directory between NSIS and MSI. Additionally, it ensures backwards compatibility to avoid breaking existing setups.