openscopeproject / TrguiNG

Remote GUI for Transmission torrent daemon
GNU Affero General Public License v3.0
334 stars 39 forks source link

Updating from installer on Windows fails if installed to Program files #15

Closed enchained closed 1 year ago

enchained commented 1 year ago

When using the exe installer without the administrator rights, if the app was already installed to a protected folder like Program files:

Currently, looks like the only working way to update the app in the protected folder is:

This is not a critical issue and probably can be completely avoided by installing to AppData, but still worth mentioning at least.

I also wonder, what is the proper way to update - with uninstall, or just rewrite is fine, since the installed app is packed into a single exe?

If the solution is a hassle to implement, release notes could mention this moment (or a wiki with errors one can encounter), cause it might be confusing to some users with the current installer implementation. Also it might be worth mentioning the exe vs msi installer difference in the release notes.

qu1ck commented 1 year ago

This is a bug in framework I'm using, see https://github.com/tauri-apps/tauri/issues/7295

Workaround for now is to manually run the installer with administrator privileges if you want to install it into protected folder like program files.

I'll put this info in release notes if there is no quick resolution.

There is no practical difference between .msi and .exe installers. NSIS (exe) installer support is fairly new so it may have some bugs like above but it is generally preferred over old .msi installers.

I also wonder, what is the proper way to update - with uninstall, or just rewrite is fine, since the installed app is packed into a single exe?

Rewrite is fine and probably a bit faster.

qu1ck commented 1 year ago

Looks like the behavior of the installer is intentional. I have an option to force privilege elevation in the installer but then it will be always required regardless if you install in a protected folder or user writable folder.

I think keeping it as is is best, I will add info about running with admin rights manually if needed.

enchained commented 1 year ago

I have an option to force privilege elevation in the installer but then it will be always required regardless

Yep, this solution is not the best, and looks like there's no on-demand option for it. Other options could be "show a note/text notification in the installer on condition", but not sure how viable it is. The release note probably will do.

Workaround for now is to manually run the installer with administrator privileges

Rewrite is fine and probably a bit faster.

It looks like manually launching installer elevated does not make the subsequent uninstaller auto-launch elevated (which is why it took me a bit to figure out it was a permission issue). Could you possibly default the selection to "Do not uninstall" option instead of "Uninstall before installing", if either is fine for updating?

qu1ck commented 1 year ago

I will see if uninstall option for update can be removed completely, it's not needed and is confusing.

qu1ck commented 1 year ago

Fixed in v0.5.0