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.55k stars 1.4k forks source link

Access denied error when using --scope machine on standard user #4410

Open github-account1111 opened 2 months ago

github-account1111 commented 2 months ago

Brief description of your issue

machine is the only scope available for HWINFO: https://github.com/microsoft/winget-pkgs/blob/master/manifests/r/REALiX/HWiNFO/8.00/REALiX.HWiNFO.installer.yaml

That means using --scope machine should make no difference, as the machine scope will be used no matter what. However, explicitly using --scope machine in the install command causes an Access denied error.

PS > winget install --id REALiX.HWiNFO --scope machine
Failed to open the predefined source; please report to winget maintainers.
An unexpected error occurred while executing the command:
0x80070005 : Access is denied.

Omitting --scope machine leads to a successful install:

PS > winget install --id REALiX.HWiNFO
Found HWiNFO [REALiX.HWiNFO] Version 8.00
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://sourceforge.net/projects/hwinfo/files/Windows_Installer/hwi64_800.exe/download
  ██████████████████████████████  12.6 MB / 12.6 MB
Successfully verified installer hash
Starting package install...
The installer will request to run as administrator, expect a prompt.
Successfully installed

Steps to reproduce

  1. Use a standard user account
  2. winget install --id <package-name> where <package_name> is a package that only has the machine scope in its manifest

Expected behavior

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

Actual behavior

Successfully installed

Environment

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

Windows: Windows.Desktop v10.0.22631.3447
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.22.10861.0
github-actions[bot] commented 2 months ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

denelon commented 2 months ago

Can you share verbose logs when the error occurs?

bejbybox commented 2 months ago

Odesláno z Proton Mail pro Android

-------- Původní zpráva -------- 25.04.24 17:49, Demitrius Nelon napsal/a:

Can you share verbose logs when the error occurs?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

github-account1111 commented 2 months ago

Can you share verbose logs when the error occurs?

2024-04-25 14:22:12.436 [CORE] WinGet, version [1.7.10861], activity [{589A3338-FE56-44E4-B742-1386F8BC2BE8}]
2024-04-25 14:22:12.436 [CORE] OS: Windows.Desktop v10.0.22631.3447
2024-04-25 14:22:12.436 [CORE] Command line Args: "C:\Users\rin\AppData\Local\Microsoft\WindowsApps\winget.exe" install --id CrystalDewWorld.CrystalDiskMark --scope machine --verbose
2024-04-25 14:22:12.436 [CORE] Package: Microsoft.DesktopAppInstaller v1.22.10861.0
2024-04-25 14:22:12.436 [CORE] IsCOMCall:0; Caller: winget-cli
2024-04-25 14:22:12.443 [CLI ] WinGet invoked with arguments: 'install' '--id' 'CrystalDewWorld.CrystalDiskMark' '--scope' 'machine' '--verbose'
2024-04-25 14:22:12.443 [CLI ] Found subcommand: install
2024-04-25 14:22:12.443 [CLI ] Leaf command to execute: root:install
2024-04-25 14:22:12.445 [CORE] Setting action: Get, Type: Secure, Name: admin_settings
2024-04-25 14:22:12.445 [CORE] Admin settings was not found
2024-04-25 14:22:12.445 [CORE] Setting action: Get, Type: Secure, Name: admin_settings
2024-04-25 14:22:12.445 [CORE] Admin settings was not found
2024-04-25 14:22:12.445 [CORE] Setting action: Get, Type: Secure, Name: admin_settings
2024-04-25 14:22:12.445 [CORE] Admin settings was not found
2024-04-25 14:22:12.445 [CLI ] Executing command: install
2024-04-25 14:22:12.445 [REPO] Additional sources GP is not enabled.
2024-04-25 14:22:12.445 [CORE] Setting action: Get, Type: Secure, Name: user_sources
2024-04-25 14:22:12.445 [CORE] Setting action: Get, Type: Secure, Name: admin_settings
2024-04-25 14:22:12.445 [CORE] Admin settings was not found
2024-04-25 14:22:12.446 [CORE] Adding chain to pinning configuration [Microsoft Store Source]:
DigiCert Global Root G3 : PublicKey
  Microsoft Azure ECC TLS Issuing CA 02 : Subject | Issuer
    sfdataservice.microsoft.com : Subject | Issuer
2024-04-25 14:22:12.446 [CORE] Adding chain to pinning configuration [Microsoft Store Source]:
DigiCert Global Root G3 : PublicKey
  Microsoft Azure ECC TLS Issuing CA 04 : Subject | Issuer
    sfdataservice.microsoft.com : Subject | Issuer
2024-04-25 14:22:12.453 [CORE] Setting action: Get, Type: Standard, Name: sources_metadata
2024-04-25 14:22:12.453 [YAML] Detected UTF-8
2024-04-25 14:22:12.453 [REPO] GetCurrentSourceRefs: Source named 'microsoft.builtin.desktop.frameworks' from origin Default is hidden and is dropped.
2024-04-25 14:22:12.453 [REPO] Default source requested, multiple sources available, adding all to source references.
2024-04-25 14:22:12.453 [REPO] Adding to source references msstore
2024-04-25 14:22:12.453 [REPO] Adding to source references winget
2024-04-25 14:22:12.453 [CLI ] Created authentication arguments. Mode: silentPreferred, Account: 
2024-04-25 14:22:12.467 [CORE] Examining extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB
2024-04-25 14:22:12.467 [CORE] Found matching extension.
2024-04-25 14:22:12.471 [REPO] Multiple sources available, creating aggregated source.
2024-04-25 14:22:12.471 [REPO] Adding to aggregated source: msstore
2024-04-25 14:22:12.471 [REPO] User agent caller found: winget-cli
2024-04-25 14:22:12.471 [REPO] Sending http GET request to: https://storeedgefd.dsx.mp.microsoft.com/v9.0/information
2024-04-25 14:22:12.471 [REPO] Http GET request details:
GET / HTTP/1.1
Content-Type: application/json
User-Agent: winget-cli WindowsPackageManager/1.7.10861 DesktopAppInstaller/Microsoft.DesktopAppInstaller v1.22.10861.0

2024-04-25 14:22:12.638 [REPO] Response status: 200
2024-04-25 14:22:12.638 [REPO] Response details:
HTTP/1.1 200 OK
Cache-Control: max-age=0, no-cache, no-store
Connection: keep-alive
Content-Length: 853
Content-Type: application/json; charset=utf-8
Date: Thu, 25 Apr 2024 18:22:12 GMT
Expires: Thu, 25 Apr 2024 18:22:12 GMT
MS-CV: yZtILvIvj0C5NswL.0
Pragma: no-cache
Server: Microsoft-HTTPAPI/2.0
X-OSG-Served-By: Torus-EASTUS_Legacy0006YN_1.0.0.0
X-Segment-On: true

{"$type":"Microsoft.Marketplace.Storefront.StoreEdgeFD.BusinessLogic.Response.PackageMetadata.PackageMetadataResponse, StoreEdgeFD","Data":{"$type":"Microsoft.Marketplace.Storefront.StoreEdgeFD.BusinessLogic.Response.PackageMetadata.PackageMetadataData, StoreEdgeFD","SourceIdentifier":"StoreEdgeFD","SourceAgreements":{"$type":"Microsoft.Marketplace.Storefront.StoreEdgeFD.BusinessLogic.Response.PackageMetadata.SourceAgreements, StoreEdgeFD","AgreementsIdentifier":"StoreEdgeFD","Agreements":[{"$type":"Microsoft.Marketplace.Storefront.StoreEdgeFD.BusinessLogic.Response.PackageManifest.AgreementDetail, StoreEdgeFD","AgreementLabel":"Terms of Transaction","AgreementUrl":"https://aka.ms/microsoft-store-terms-of-transaction"}]},"ServerSupportedVersions":["1.0.0","1.1.0"],"RequiredQueryParameters":["market"],"RequiredPackageMatchFields":["market"]}}
2024-04-25 14:22:12.638 [REPO] Authentication node not found. Assuming authentication type none.
2024-04-25 14:22:12.638 [REPO] User agent caller found: winget-cli
2024-04-25 14:22:12.639 [REPO] Sending http GET request to: https://storeedgefd.dsx.mp.microsoft.com/v9.0/information
2024-04-25 14:22:12.639 [REPO] Http GET request details:
GET / HTTP/1.1
Content-Type: application/json
User-Agent: winget-cli WindowsPackageManager/1.7.10861 DesktopAppInstaller/Microsoft.DesktopAppInstaller v1.22.10861.0

2024-04-25 14:22:12.682 [REPO] Response status: 200
2024-04-25 14:22:12.682 [REPO] Response details:
HTTP/1.1 200 OK
Cache-Control: max-age=0, no-cache, no-store
Connection: keep-alive
Content-Length: 853
Content-Type: application/json; charset=utf-8
Date: Thu, 25 Apr 2024 18:22:12 GMT
Expires: Thu, 25 Apr 2024 18:22:12 GMT
MS-CV: yZtILvIvj0C5NswL.0
Pragma: no-cache
Server: Microsoft-HTTPAPI/2.0
X-OSG-Served-By: Torus-EASTUS_Legacy0006YN_1.0.0.0
X-Segment-On: true

{"$type":"Microsoft.Marketplace.Storefront.StoreEdgeFD.BusinessLogic.Response.PackageMetadata.PackageMetadataResponse, StoreEdgeFD","Data":{"$type":"Microsoft.Marketplace.Storefront.StoreEdgeFD.BusinessLogic.Response.PackageMetadata.PackageMetadataData, StoreEdgeFD","SourceIdentifier":"StoreEdgeFD","SourceAgreements":{"$type":"Microsoft.Marketplace.Storefront.StoreEdgeFD.BusinessLogic.Response.PackageMetadata.SourceAgreements, StoreEdgeFD","AgreementsIdentifier":"StoreEdgeFD","Agreements":[{"$type":"Microsoft.Marketplace.Storefront.StoreEdgeFD.BusinessLogic.Response.PackageManifest.AgreementDetail, StoreEdgeFD","AgreementLabel":"Terms of Transaction","AgreementUrl":"https://aka.ms/microsoft-store-terms-of-transaction"}]},"ServerSupportedVersions":["1.0.0","1.1.0"],"RequiredQueryParameters":["market"],"RequiredPackageMatchFields":["market"]}}
2024-04-25 14:22:12.682 [REPO] Authentication node not found. Assuming authentication type none.
2024-04-25 14:22:12.682 [REPO] Adding to aggregated source: winget
2024-04-25 14:22:12.688 [CORE] Examining extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB
2024-04-25 14:22:12.688 [CORE] Found matching extension.
2024-04-25 14:22:12.707 [REPO] Opening database for ImmutableRead at 'C:\Program Files\WindowsApps\Microsoft.Winget.Source_2024.425.1828.849_neutral__8wekyb3d8bbwe\Public\index.db'
2024-04-25 14:22:12.707 [REPO] Opened SQLite Index with version [1.7], last write [2024-04-25 13:28:31.000]
2024-04-25 14:22:12.825 [CLI ] Checking Source agreements for source: msstore
2024-04-25 14:22:12.825 [REPO] Additional sources GP is not enabled.
2024-04-25 14:22:12.825 [CORE] Setting action: Get, Type: Secure, Name: user_sources
2024-04-25 14:22:12.826 [CORE] Setting action: Get, Type: Secure, Name: admin_settings
2024-04-25 14:22:12.826 [CORE] Admin settings was not found
2024-04-25 14:22:12.826 [CORE] Adding chain to pinning configuration [Microsoft Store Source]:
DigiCert Global Root G3 : PublicKey
  Microsoft Azure ECC TLS Issuing CA 02 : Subject | Issuer
    sfdataservice.microsoft.com : Subject | Issuer
2024-04-25 14:22:12.826 [CORE] Adding chain to pinning configuration [Microsoft Store Source]:
DigiCert Global Root G3 : PublicKey
  Microsoft Azure ECC TLS Issuing CA 04 : Subject | Issuer
    sfdataservice.microsoft.com : Subject | Issuer
2024-04-25 14:22:12.826 [CORE] Setting action: Get, Type: Standard, Name: sources_metadata
2024-04-25 14:22:12.826 [YAML] Detected UTF-8
2024-04-25 14:22:12.826 [CLI ] Source agreements satisfied. Source: msstore
2024-04-25 14:22:12.826 [CLI ] Checking Source agreements for source: winget
2024-04-25 14:22:12.826 [REPO] Additional sources GP is not enabled.
2024-04-25 14:22:12.826 [CORE] Setting action: Get, Type: Secure, Name: user_sources
2024-04-25 14:22:12.826 [CORE] Setting action: Get, Type: Secure, Name: admin_settings
2024-04-25 14:22:12.826 [CORE] Admin settings was not found
2024-04-25 14:22:12.827 [CORE] Adding chain to pinning configuration [Microsoft Store Source]:
DigiCert Global Root G3 : PublicKey
  Microsoft Azure ECC TLS Issuing CA 02 : Subject | Issuer
    sfdataservice.microsoft.com : Subject | Issuer
2024-04-25 14:22:12.827 [CORE] Adding chain to pinning configuration [Microsoft Store Source]:
DigiCert Global Root G3 : PublicKey
  Microsoft Azure ECC TLS Issuing CA 04 : Subject | Issuer
    sfdataservice.microsoft.com : Subject | Issuer
2024-04-25 14:22:12.827 [CORE] Setting action: Get, Type: Standard, Name: sources_metadata
2024-04-25 14:22:12.827 [YAML] Detected UTF-8
2024-04-25 14:22:12.827 [CLI ] Source agreements satisfied. Source: winget
2024-04-25 14:22:12.827 [REPO] Creating PredefinedInstalledSource with filter [Machine]
2024-04-25 14:22:12.827 [REPO] Creating new SQLite Index with version [Latest] at ':memory:'
2024-04-25 14:22:12.831 [REPO] Reading MSI UpgradeCodes
2024-04-25 14:22:12.831 [REPO] Examining ARP entries for Machine | X64
2024-04-25 14:22:12.831 [REPO] Skipping AddressBook because DisplayName is not a REG_SZ value
2024-04-25 14:22:12.831 [REPO] Skipping Connection Manager because it is a SystemComponent
2024-04-25 14:22:12.831 [REPO] Skipping DirectDrawEx because DisplayName is not a REG_SZ value
2024-04-25 14:22:12.831 [REPO] Skipping DXM_Runtime because DisplayName is not a REG_SZ value
2024-04-25 14:22:12.831 [REPO] Skipping Fontcore because DisplayName is not a REG_SZ value
2024-04-25 14:22:12.831 [REPO] Adding manifest for [HWiNFO64_is1, 8.00] at relative path [HWiNFO64_is1]
2024-04-25 14:22:12.831 [REPO] Did not find an Id { HWiNFO64_is1 }
2024-04-25 14:22:12.832 [REPO] Skipping IE40 because DisplayName is not a REG_SZ value
2024-04-25 14:22:12.832 [REPO] Skipping IE4Data because DisplayName is not a REG_SZ value
2024-04-25 14:22:12.833 [REPO] Skipping IE5BAKEX because DisplayName is not a REG_SZ value
2024-04-25 14:22:12.833 [REPO] Skipping IEData because DisplayName is not a REG_SZ value
2024-04-25 14:22:12.833 [REPO] Skipping MobileOptionPack because DisplayName is not a REG_SZ value
2024-04-25 14:22:12.833 [REPO] Skipping MPlayer2 because DisplayName is not a REG_SZ value
2024-04-25 14:22:12.833 [REPO] Skipping mstsc-4b0a31aa-df6a-4307-9b47-d5cc50009643 because DisplayName is not a REG_SZ value
2024-04-25 14:22:12.833 [REPO] Adding manifest for [O365HomePremRetail - en-us, 16.0.17425.20176] at relative path [O365HomePremRetail - en-us]
2024-04-25 14:22:12.833 [REPO] Did not find an Id { O365HomePremRetail - en-us }
2024-04-25 14:22:12.834 [REPO] Adding manifest for [OneNoteFreeRetail - en-us, 16.0.17425.20176] at relative path [OneNoteFreeRetail - en-us]
2024-04-25 14:22:12.834 [REPO] Did not find an Id { OneNoteFreeRetail - en-us }
2024-04-25 14:22:12.834 [REPO] Adding manifest for [ReadyFor, 4.0.0.0] at relative path [ReadyFor]
2024-04-25 14:22:12.834 [REPO] Did not find an Id { ReadyFor }
2024-04-25 14:22:12.835 [REPO] Skipping SchedulingAgent because DisplayName is not a REG_SZ value
2024-04-25 14:22:12.835 [REPO] Skipping WIC because DisplayName is not a REG_SZ value
2024-04-25 14:22:12.835 [REPO] Skipping {008667B9-294F-45C3-BB03-E6FBC58B26AF} because it is a SystemComponent
2024-04-25 14:22:12.835 [REPO] Skipping {0FFA44C0-CFC0-4C1B-AACC-2C4BE1CDDB37} because it is a SystemComponent
2024-04-25 14:22:12.835 [REPO] Skipping {607A9135-1477-43AB-A8B0-7690DC1C58D3} because it is a SystemComponent
2024-04-25 14:22:12.835 [REPO] Skipping {662A0088-6FCD-45DD-9EA7-68674058AED5} because it is a SystemComponent
2024-04-25 14:22:12.835 [REPO] Skipping {6DB765A8-05AF-49A1-A71D-6F645EE3CE41} because it is a SystemComponent
2024-04-25 14:22:12.835 [REPO] Adding manifest for [{850cdc16-85df-4052-b06e-4e3e9e83c5c6}, 1.70.551909] at relative path [{850cdc16-85df-4052-b06e-4e3e9e83c5c6}]
2024-04-25 14:22:12.835 [REPO] Did not find an Id { {850cdc16-85df-4052-b06e-4e3e9e83c5c6} }
2024-04-25 14:22:12.836 [REPO] Skipping {90160000-007E-0000-1000-0000000FF1CE} because it is a SystemComponent
2024-04-25 14:22:12.836 [REPO] Skipping {90160000-008C-0000-1000-0000000FF1CE} because it is a SystemComponent
2024-04-25 14:22:12.836 [REPO] Adding manifest for [{C6FD611E-7EFE-488C-A0E0-974C09EF6473}, 5.72.0.0] at relative path [{C6FD611E-7EFE-488C-A0E0-974C09EF6473}]
2024-04-25 14:22:12.836 [REPO] Did not find an Id { {C6FD611E-7EFE-488C-A0E0-974C09EF6473} }
2024-04-25 14:22:12.837 [REPO] Skipping {D1368E0E-D6FB-4C42-9132-885E5C23DB05} because it is a SystemComponent
2024-04-25 14:22:12.837 [REPO] Examining ARP entries for Machine | X86
2024-04-25 14:22:12.837 [REPO] Skipping AddressBook because DisplayName is not a REG_SZ value
2024-04-25 14:22:12.837 [REPO] Skipping Connection Manager because it is a SystemComponent
2024-04-25 14:22:12.837 [REPO] Skipping DirectDrawEx because DisplayName is not a REG_SZ value
2024-04-25 14:22:12.837 [REPO] Skipping DXM_Runtime because DisplayName is not a REG_SZ value
2024-04-25 14:22:12.837 [REPO] Skipping Fontcore because DisplayName is not a REG_SZ value
2024-04-25 14:22:12.837 [REPO] Skipping IE40 because DisplayName is not a REG_SZ value
2024-04-25 14:22:12.837 [REPO] Skipping IE4Data because DisplayName is not a REG_SZ value
2024-04-25 14:22:12.837 [REPO] Skipping IE5BAKEX because DisplayName is not a REG_SZ value
2024-04-25 14:22:12.837 [REPO] Skipping IEData because DisplayName is not a REG_SZ value
2024-04-25 14:22:12.837 [REPO] Skipping Lenovo Dependency Package_is1 because DisplayName is not a REG_SZ value
2024-04-25 14:22:12.837 [REPO] Adding manifest for [Microsoft Edge, 124.0.2478.51] at relative path [Microsoft Edge]
2024-04-25 14:22:12.837 [REPO] Did not find an Id { Microsoft Edge }
2024-04-25 14:22:12.838 [REPO] Adding manifest for [Microsoft Edge Update, 1.3.185.29] at relative path [Microsoft Edge Update]
2024-04-25 14:22:12.838 [REPO] Did not find an Id { Microsoft Edge Update }
2024-04-25 14:22:12.839 [REPO] Adding manifest for [Microsoft EdgeWebView, 124.0.2478.51] at relative path [Microsoft EdgeWebView]
2024-04-25 14:22:12.839 [REPO] Did not find an Id { Microsoft EdgeWebView }
2024-04-25 14:22:12.839 [REPO] Skipping MobileOptionPack because DisplayName is not a REG_SZ value
2024-04-25 14:22:12.839 [REPO] Skipping MPlayer2 because DisplayName is not a REG_SZ value
2024-04-25 14:22:12.840 [REPO] Skipping SchedulingAgent because DisplayName is not a REG_SZ value
2024-04-25 14:22:12.840 [REPO] Adding manifest for [VantageSRV_is1, 4.0.52.0] at relative path [VantageSRV_is1]
2024-04-25 14:22:12.840 [REPO] Did not find an Id { VantageSRV_is1 }
2024-04-25 14:22:12.840 [REPO] Skipping WIC because DisplayName is not a REG_SZ value
2024-04-25 14:22:12.840 [REPO] Adding manifest for [{422d8da1-2e1a-4704-b462-db5439c6d1b9}, 5.0.10.30418] at relative path [{422d8da1-2e1a-4704-b462-db5439c6d1b9}]
2024-04-25 14:22:12.840 [REPO] Did not find an Id { {422d8da1-2e1a-4704-b462-db5439c6d1b9} }
2024-04-25 14:22:12.841 [REPO] Adding manifest for [{57a73df6-4ba9-4c1d-bbbb-517289ff6c13}, 14.30.30704.0] at relative path [{57a73df6-4ba9-4c1d-bbbb-517289ff6c13}]
2024-04-25 14:22:12.841 [REPO] Did not find an Id { {57a73df6-4ba9-4c1d-bbbb-517289ff6c13} }
2024-04-25 14:22:12.842 [REPO] Examining MSIX entries for Machine
2024-04-25 14:22:12.846 [FAIL] WindowsPackageManager.dll!00007FFE3E362C81: LogHr(1) tid(3914) 80070005 Access is denied.

2024-04-25 14:22:12.946 [CLI ] Caught winrt::hresult_error: 0x80070005 : Access is denied.
Stuntman58 commented 2 months ago

Explain to me why do I continue to get these messages

Get Outlook for Androidhttps://aka.ms/AAb9ysg


denelon commented 2 months ago

@Stuntman58, I suspect you might be "subscribed" to winget-cli at GitHub. You can probably check your notification settings. Generally, notifications are sent only when you interact with an issue, unless a repository level notification is set.

github-account1111 commented 2 months ago

@denelon following up in case you missed the log right above the guy you replied to.

https://github.com/microsoft/winget-pkgs/issues/136036 seems related.