-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Installation inconsistency (Windows) #8345
Comments
PRs welcome if you have time. |
Hi @SomberNight, I can create a PR but I want to clarify something before I do that. What I'd select is an option number 1 (fully user-based installation without UAC elevation), because I see it as the most logical choice for Electrum. So to sum up, does Electrum require admin rights only to be able to install into ProgramFiles by default? And are you okay with the choice to make user-based installation the preferred one instead? Either way, I'll be glad to create a PR. * I've just found special NSIS plugin that allows user to choose how to install the app, we may integrate that instead of hardcoding the paths. |
Yes, I think so.
This sounds good to me. However, I only have minimal familiarity with what the related current best practices are for Windows, and what other programs are doing (or indeed with these kind of windows internals in general). One thing to consider is existing installs. What will happen if a user already has Electrum installed into $PROGRAMFILES, and they run the installer for a new version? I suppose we would leave the old version in $PROGRAMFILES to linger around? Maybe we could clean it up (although that would require a UAC prompt I guess). Or we would just mention it in the release notes... :/ What about URI-handlers? electrum/contrib/build-wine/electrum.nsi Lines 135 to 139 in 663ea43
Can those "HKCU" registry keys be set without admin privileges? |
I think per-user isolation is indeed the modern best practice. Take, for example, Google Chrome, Python-v3, or VS Code. All default to per-user installation (and support per-machine too if explicitly asked). Simple as that, different users may need different sets of software. Different users may use different wallets afterall.
Yes, no problem with that.
Previous installation path is kept in registry, and installer automatically presents it to user for easy update. Thus, for those who already have Electrum installed, elevation will still be required since they'll probably install in $PROGRAMFILES again. Or, if they decide to change the installation path, then previous instance will be left orphaned indeed and will need manual deletion of files (all registry entries, desktop & Start menu icons, URI-handlers will point to the new instance). Well, indeed, update process is the main barrier here, as it just complicates things instead of simplification. I think this entire installation behaviour change (whatever it'd mean in the result) can be treated as a breaking change and be postponed to the next major version release, or until some ideal solution is found. |
Currently, installer performs a machine-wide installation (requiring UAC elevation) but writes its uninstall entries to 'HKEY_CURRENT_USER' registry key, which may confuse some software like package managers (WinGet is one of them).
I believe for proper consistency you should either:
Also, some installers support both types of installation at the same time via command-line arguments like '/CURRENTUSER' and '/ALLUSERS'.
The text was updated successfully, but these errors were encountered: