DeaDBeeF-Player / deadbeef

DeaDBeeF Player
https://deadbeef.sourceforge.io/
Other
1.59k stars 174 forks source link

Bug: installer requires elevation when installing in per-user mode #3084

Open soredake opened 2 months ago

soredake commented 2 months ago

Steps to reproduce the problem

1) Download latest installer, choose per-user install mode, try to install it. 2) Errors.

What's going on? Describe the problem in as much detail as possible.

Untitled-1 Untitled

Same problem I reported for wingetui software: https://github.com/marticliment/WingetUI/issues/1623

Information about the software:

Deadbeef version: 1.9.6 OS: Windows 11 Pro

Oleksiy-Yakovenko commented 2 months ago

@kuba160 FYI:

potentially need to add this to ISCC config:

[Setup]
...
PrivilegesRequired=lowest
kuba160 commented 2 months ago

potentially need to add this to ISCC config:

[Setup]
...
PrivilegesRequired=lowest

This just changes the default behavior of the installer. Commit 74dd665 did enable user-mode installation through override (dialog will be shown on launch where user can choose the install mode and will request privileges when necessary).

The issue here is:

  1. Creating desktop icon fails. If I read winget .iss file correctly, they only do it on regular install, not 100% why it can't be done on non-privileged install.
  2. File association can only be done through privileged install, which means that it has to be marked as disabled/unavailable in user install.
soredake commented 2 months ago

Creating desktop icon fails. If I read winget .iss file correctly, they only do it on regular install, not 100% why it can't be done on non-privileged install.

Because installer creating them in privileged location even when installing per-user.

When installing only for current user, start menu shortcut should be created in $env:APPDATA\Microsoft\Windows\Start Menu\Programs, not in C: \ProgramData\Microsoft\Windows\Start Menu\WingetUI .Ink which requires UAC prompt.

Similar for desktop shortcut, start menu shortcut should be created in $env:HOME\Desktop, not in C:\Users\Public\Desktop\WingetUI .Ink which requires UAC prompt.

Quoting myself from wingetui issue.

How it's been fixed for wingetui installer: https://github.com/marticliment/WingetUI/commit/c5f6331f3aefffb640892af04f06a7a957ba1333

File association can only be done through privileged install, which means that it has to be marked as disabled/unavailable in user install.

It can be done without priviledges, see https://stackoverflow.com/a/27091968/4207635