microsoft / winget-cli

WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
https://learn.microsoft.com/windows/package-manager/
MIT License
22.53k stars 1.39k forks source link

WinGet installation of 7Zip: 0x80070005 : unknown error #4492

Closed iPoetDev closed 4 weeks ago

iPoetDev commented 1 month ago

Brief description of your issue

| Failed to open the predefined source; please report to winget maintainers.
| An unexpected error occurred while executing the command: 
| 0x80070005 : unknown error

Steps to reproduce

WingetUI has reliable logs and installation options to switch between. So Instead of WinGetUI, I reverted to a interactive (7Zip) default installer option. Still failed.

Expected behavior

7Zip to install using winget via a package manager UI: WinGetUI by Marti Clements WingetUI Version 3.0.2 I use winget as the default option, over chocolaty, scoop etc, and it works nominally for most install, except for this package.

Actual behavior

Starting package update operation for package id=7zip.7zipwith Manager name=Winget Given installation options are Process Executable : C:\Program Files\WingetUI\PackageEngine\Managers\winget-cli_x64\winget.exe Process Call Arguments : update --id 7zip.7zip --exact --accept-source-agreements --scope machine --version 23.01 --force --interactive --accept-package-agreements --force --include-unknown Working Directory : C:\Users\ | \ | ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ 1024 KB / 10.6 MB | █████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ 2.00 MB / 10.6 MB | ████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ 3.00 MB / 10.6 MB | ███████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ 4.00 MB / 10.6 MB | ██████████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ 5.00 MB / 10.6 MB | ████████████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒ 6.00 MB / 10.6 MB | ███████████████████▒▒▒▒▒▒▒▒▒▒▒ 7.00 MB / 10.6 MB | ██████████████████████▒▒▒▒▒▒▒▒ 8.00 MB / 10.6 MB | █████████████████████████▒▒▒▒▒ 9.00 MB / 10.6 MB | ████████████████████████████▒▒ 10.0 MB / 10.6 MB | ██████████████████████████████ 10.6 MB / 10.6 MB | Failed to open the predefined source; please report to winget maintainers. | An unexpected error occurred while executing the command: | 0x80070005 : unknown error Process Exit Code : -2147024891 Process End Time : 17/05/2024 11:19:15

Environment

Windows Package Manager v1.7.11261
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22631.3527
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.22.11261.0

Winget Directories
-----------------------------------------------------------------------------------------------------------------------
Logs                               %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Diag…
User Settings                      %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\sett…
Portable Links Directory (User)    %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User)       %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root              C:\Program Files\WinGet\Packages
Portable Package Root (x86)        C:\Program Files (x86)\WinGet\Packages
Installer Downloads                D:\Download

Links
---------------------------------------------------------------------------
Privacy Statement   https://aka.ms/winget-privacy
License Agreement   https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage            https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale

Admin Setting                             State
--------------------------------------------------
LocalManifestFiles                        Disabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride                     Disabled
LocalArchiveMalwareScanOverride           Disabled
iPoetDev commented 1 month ago

I reported as it was instructed to by the WinGet Logs.

Trenly commented 1 month ago
PS C:\Users\WDAGUtilityAccount\Desktop\winget-pkgs> winget error 0x80070005
0x80070005
Access is denied.

@ipoetdev - Do you get the same error if you run the command directly in PowerShell? This seems to be the command that WingetUI is attempting to run

winget update --id 7zip.7zip --exact --accept-source-agreements --scope machine --version 23.01 --force --interactive --accept-package-agreements --force --include-unknown

If the command above does error, does it still error if you add --source winget at the end?

@marticliment - I see the --force parameter is specified twice, Is that a bug in WingetUI?

marticliment commented 1 month ago

In some circumstances it does, but I have not fixed this duplication since I have never found an issue with passing the parameter --force twice

microsoft-github-policy-service[bot] commented 1 month ago

Hello @iPoetDev,

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 7 days of this comment.

Template: msftbot/noRecentActivity