Bug 144034 - winget installation doesn't work due to missing admin priviliges.
Summary: winget installation doesn't work due to missing admin priviliges.
Status: RESOLVED NOTOURBUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Installation (show other bugs)
Version:
(earliest affected)
7.2.0.4 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-23 13:51 UTC by laslo.hauschild
Modified: 2021-08-23 16:31 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Log of installation (19.99 KB, application/octet-stream)
2021-08-23 13:54 UTC, laslo.hauschild
Details

Note You need to log in before you can comment on or make changes to this bug.
Description laslo.hauschild 2021-08-23 13:51:58 UTC
Description:
Winget is the new package manager from Microsoft itself. LibreOffice can be installed with cmd via 'winget install LibreOffice.LibreOffice'. 
However, the installation fails with an error report file. The important line in it is "MSI (s) (AC:0C) [13:35:52:268]: Product: LibreOffice 7.2.0.4 - The installation wizard cannot run correctly because you do not have sufficient administrator rights for this system under the user you are logged in as."

Long story short, the headless installer must show the admin guide on Windows because there is no way to run it as a user as administrator. Running cmd in admin mode does not work because winget is a command that can only be run by normal users.

Steps to Reproduce:
1.Install winget
2.Run command 'winget install LibreOffice.LibreOffice'

Actual Results:
Output of command:
Found LibreOffice [LibreOffice.LibreOffice].
This application is licensed to you by its owner.
Microsoft is not responsible for and does not license third-party packages.
Downloading https://download.documentfoundation.org/libreoffice/stable/7.2.0/win/x86_64/LibreOffice_7.2.0_Win_x64.msi
  ██████████████████████████████ 323 MB / 323 MB
The installer hash was successfully verified
Package installation is started...
Installer failed with exit code: 1603
Installer log is available at: C:\Users\MyNameIsPrivate\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir\WinGet-LibreOffice.LibreOffice.7.2.0.4-2021-08-23-13-35-50.691.log

Expected Results:
Libreoffice should request admin privilges to run installer and then install.


Reproducible: Always


User Profile Reset: No



Additional Info:
No.
Comment 1 laslo.hauschild 2021-08-23 13:54:19 UTC
Created attachment 174491 [details]
Log of installation
Comment 2 Mike Kaganski 2021-08-23 15:33:30 UTC
It doesn't matter if winget is from MS or not. What does matter is that winget uses a community-managed repository [1], where some volunteer had committed LibreOffice data [2]. You should file bugs there, subscribing the author of the package data to the issue.

Resolving NOTOURBUG (feel free to set back to UNCONFIRMED if it is discovered that it is truly a LibreOffice fault, not some packaging problem).

[1] https://github.com/microsoft/winget-pkgs
[2] https://github.com/microsoft/winget-pkgs/commit/1f7a849d57316d662a49322e6aa442853d0ead79
Comment 3 Mike Kaganski 2021-08-23 15:48:25 UTC
And indeed, the package defines "/qn" installer switch, which means "no UI during the installation process" [1]. This is known that in this mode, no UAC is shown [2]. It is likely that the author of the mentioned commit hadn't tested what they added thoroughly enough (e.g., they might have UAC disabled locally, or use winget from admin command prompt).

Definitely NOTOURBUG.

[1] https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/msiexec
[2] https://csi-windows.com/blog/all/27-csi-news-general/335-how-to-silence-the-uac-prompt-for-per-machine-msi-packages-for-non-admins
Comment 4 V Stuart Foote 2021-08-23 15:58:21 UTC
@Mike, looking at the .yaml for the bundle the posted SHA-256 hash and URL used for the msi matches the TDF community mirrors. If the MSI signature matches the install is our MSI packaging.

There have been a number of folks reporting a MSI #1603 error [1] against an LO install with winget.

winget is so new, is there some tweak we need to apply to the packaging that will facilitate the non-admin but elevate privileges?

=-ref-=
[1] https://github.com/microsoft/winget-cli/issues/248#issuecomment-850821797
Comment 5 V Stuart Foote 2021-08-23 16:21:17 UTC
(In reply to V Stuart Foote from comment #4)
>the MSI signature matches the install [so] is our [TDF community] MSI packaging.

But it looks like the winget project has no support for "non-silent" installs [1], which we know is not the LO way.

"All tools must support a silent install. If you have an executable that does not support a silent install, then we cannot provide that tool at this time."

To support winget, what would packaging for a silent LO install entail?

Guess this really is NOTOURBUG (as built the TDF Community build installers can not do a silent install), right?

=-ref-=
[1] https://github.com/microsoft/winget-cli/blob/master/doc/ManifestSpecv1.0.md
Comment 6 Mike Kaganski 2021-08-23 16:31:20 UTC
(In reply to V Stuart Foote from comment #5)
> But it looks like the winget project has no support for "non-silent"
> installs [1], which we know is not the LO way.
> 
> "All tools must support a silent install. If you have an executable that
> does not support a silent install, then we cannot provide that tool at this
> time."

We perfectly support silent installation. What we don't support is silent installation under non-elevated rights. Which is OK, since being able to install to a restricted directories like Program Files from non-elevated rights is a security breach.

Winget packager needs to issue a warning that winget needs to be run from admin console. Or it needs a complete repackage, as portable installers do, to install to a user directory.

Closing NOTOURBUG again.