feat(uninstaller): remove autostart entry during uninstallation#12643
Conversation
Signed-off-by: animeshchaudri <animeshchaudhri3@gmail.com>
Package Changes Through fe3c028There are 12 changes which include tauri with minor, tauri-runtime with minor, tauri-runtime-wry with minor, tauri-utils with minor, tauri-cli with minor, @tauri-apps/cli with minor, @tauri-apps/api with minor, tauri-bundler with patch, tauri-build with minor, tauri-codegen with minor, tauri-macros with minor, tauri-plugin with minor Planned Package VersionsThe following package releases are the planned based on the context of changes in this pull request.
Add another change file through the GitHub UI by following this link. Read about change files or the docs at github.com/jbolda/covector |
|
thanks for the pr. do you think you can do the same for wix/msi ? |
I'm not sure if this would work.. how can I test? @FabianLars |
I have tested this and it works and I am working on wix/msi now |
|
from the WiX docs:
https://docs.firegiant.com/wix3/xsd/wix/removeregistryvalue/ so i think we're stuck with fixing for NSIS only |
|
This PR is somewhat wrong as well since we only remove it from the current user but removing hkcu keys of other users is hard and afaik frowned upon. With how often i have orphaned autostart entries it seems like most programs just go with the "fuck it, not our problem" and i think we should too (this pr is fine though we may want to consider guarding it behind the installMode as well) |
so this only makes sense if the installmode is peruser right? auto-launch seems to try to enable it on local machine too: https://github.com/zzzgydi/auto-launch/blob/6542a3c4033fe1f3a8757dd65daf7e0c872a0756/src/windows.rs#L55 |
imo yes
which is a bit problematic because (in tauri) whether the app runs with admin or not is unrelated to the install mode. |
|
@FabianLars @lucasfernog Thanks, guys, for fixing the issue! This was my first PR. I’ve been assigned more issues, but nobody answers my questions related to Tauri architecture, even when I ping them on Discord. So, I had to YOLO it. lol |
|
we're yolo-ing it as well so this was a good start! |
I opened a PR to auto-launch to help us here zzzgydi/auto-launch#21 |
That is added in only in the git version, so it's not used in our auto start plugin yet
@lucasfernog There's one already zzzgydi/auto-launch#20 |
…i-apps#12643) * feat(uninstaller): remove autostart entry during uninstallation Signed-off-by: animeshchaudri <animeshchaudhri3@gmail.com> * add change file * check when not updating * delete registry value only if install mode is "currentUser" --------- Signed-off-by: animeshchaudri <animeshchaudhri3@gmail.com> Co-authored-by: Lucas Nogueira <lucas@tauri.app>

Summary
This PR fixes issue #12422 by ensuring that the autostart registry entry at
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Runis removed when the application is uninstalled.
Previously, uninstalling an application that was set to autostart via
tauri-plugin-autostartwould leave behind an invalid registry entry, causing unintended behavior. This PR modifies the uninstallation process to clean up these entries properly.Related PRs
Changes
Testing
References
Closes #12422.