Skip to content

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

Closed

Description

@github-account1111

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

Activity

  1. github-actions commented on Apr 25, 2024

    @github-actions

    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.

  2. added
    Issue-BugIt either shouldn't be doing this or needs an investigation.
    Command-InstallIssue related to WinGet Install
    and removed
    Needs-TriageIssue needs to be triaged
    on Apr 25, 2024
  3. denelon commented on Apr 25, 2024

    @denelon
    Collaborator

    Can you share verbose logs when the error occurs?

  4. bejbybox commented on Apr 25, 2024

    @bejbybox
  5. github-account1111 commented on Apr 25, 2024

    @github-account1111
    Author

    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.
    
  6. Stuntman58 commented on Apr 25, 2024

    @Stuntman58
  7. denelon commented on Apr 26, 2024

    @denelon
    Collaborator

    Allan R. Pearson (@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.

  8. github-account1111 commented on May 1, 2024

    @github-account1111
    Author

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

    microsoft/winget-pkgs#136036 seems related.

  9. jantari commented on Jul 2, 2025

    @jantari

    This is still an issue in the latest version of Winget.

    Verbose logs
    2025-07-02 16:05:35.224 [CORE] WinGet, version [1.11.400], activity [{649FD440-7CC4-490B-8A75-8FA53BC6DDAD}]
    2025-07-02 16:05:35.226 [CORE] OS: Windows.Desktop v10.0.26100.4351
    2025-07-02 16:05:35.226 [CORE] Command line Args: "C:\Users\jantari\AppData\Local\Microsoft\WindowsApps\winget.exe" install --id Starship.Starship --exact --silent --scope machine --source winget --verbose-logs
    2025-07-02 16:05:35.226 [CORE] Package: Microsoft.DesktopAppInstaller v1.26.400.0
    2025-07-02 16:05:35.226 [CORE] IsCOMCall:0; Caller: winget-cli
    2025-07-02 16:05:35.258 [CLI ] WinGet invoked with arguments: 'install' '--id' 'Starship.Starship' '--exact' '--silent' '--scope' 'machine' '--source' 'winget' '--verbose-logs'
    2025-07-02 16:05:35.259 [CLI ] Found subcommand: install
    2025-07-02 16:05:35.259 [CLI ] Leaf command to execute: root:install
    2025-07-02 16:05:35.262 [CORE] Setting action: Get, Type: Secure, Name: admin_settings
    2025-07-02 16:05:35.263 [CORE] Admin settings was not found
    2025-07-02 16:05:35.263 [CORE] Setting action: Get, Type: Secure, Name: admin_settings
    2025-07-02 16:05:35.263 [CORE] Admin settings was not found
    2025-07-02 16:05:35.264 [CORE] Setting action: Get, Type: Secure, Name: admin_settings
    2025-07-02 16:05:35.264 [CORE] Admin settings was not found
    2025-07-02 16:05:35.265 [CORE] Setting action: Get, Type: Secure, Name: admin_settings
    2025-07-02 16:05:35.265 [CORE] Admin settings was not found
    2025-07-02 16:05:35.266 [CORE] Setting action: Get, Type: Secure, Name: admin_settings
    2025-07-02 16:05:35.266 [CORE] Admin settings was not found
    2025-07-02 16:05:35.266 [CLI ] Executing command: install
    2025-07-02 16:05:35.269 [REPO] Additional sources GP is not enabled.
    2025-07-02 16:05:35.269 [CORE] Setting action: Get, Type: Secure, Name: user_sources
    2025-07-02 16:05:35.269 [CORE] Setting action: Get, Type: Secure, Name: admin_settings
    2025-07-02 16:05:35.270 [CORE] Admin settings was not found
    2025-07-02 16:05:35.273 [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
    2025-07-02 16:05:35.273 [CORE] Adding chain to pinning configuration [Microsoft Store Source]:
    DigiCert Global Root G3 : PublicKey
      Microsoft Azure ECC TLS Issuing CA 07 : Subject | Issuer
        sfdataservice.microsoft.com : Subject | Issuer
    2025-07-02 16:05:35.309 [CORE] Setting action: Get, Type: Standard, Name: sources_metadata
    2025-07-02 16:05:35.312 [YAML] Detected UTF-8
    2025-07-02 16:05:35.313 [REPO] Named source requested, found: winget
    2025-07-02 16:05:35.314 [CLI ] Created authentication arguments. Mode: silentPreferred, Account: 
    2025-07-02 16:05:35.381 [CORE] Examining extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB
    2025-07-02 16:05:35.381 [CORE] Found matching extension.
    2025-07-02 16:05:35.426 [CORE] Examining extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB
    2025-07-02 16:05:35.427 [CORE] Found matching extension.
    2025-07-02 16:05:35.562 [REPO] Opening database for ImmutableRead at 'C:\Program Files\WindowsApps\Microsoft.Winget.Source_2025.702.1331.41_neutral__8wekyb3d8bbwe\Public\index.db'
    2025-07-02 16:05:35.566 [REPO] Opened SQLite Index with version [2.0], last write [2025-07-02 14:29:39.000]
    2025-07-02 16:05:35.972 [CLI ] Checking Source agreements for source: winget
    2025-07-02 16:05:35.975 [REPO] Additional sources GP is not enabled.
    2025-07-02 16:05:35.975 [CORE] Setting action: Get, Type: Secure, Name: user_sources
    2025-07-02 16:05:35.976 [CORE] Setting action: Get, Type: Secure, Name: admin_settings
    2025-07-02 16:05:35.977 [CORE] Admin settings was not found
    2025-07-02 16:05:35.977 [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
    2025-07-02 16:05:35.978 [CORE] Adding chain to pinning configuration [Microsoft Store Source]:
    DigiCert Global Root G3 : PublicKey
      Microsoft Azure ECC TLS Issuing CA 07 : Subject | Issuer
        sfdataservice.microsoft.com : Subject | Issuer
    2025-07-02 16:05:35.978 [CORE] Setting action: Get, Type: Standard, Name: sources_metadata
    2025-07-02 16:05:35.979 [YAML] Detected UTF-8
    2025-07-02 16:05:35.980 [CLI ] Source agreements satisfied. Source: winget
    2025-07-02 16:05:35.980 [REPO] Creating PredefinedInstalledSource with filter [Machine]
    2025-07-02 16:05:35.980 [REPO] Creating new SQLite Index with version [Latest] at ':memory:'
    2025-07-02 16:05:36.000 [REPO] Reading MSI UpgradeCodes
    2025-07-02 16:05:36.006 [REPO] Examining ARP entries for Machine | X64
    2025-07-02 16:05:36.006 [REPO] Adding manifest for [ARP\Machine\X64\7-Zip, 24.09] at relative path []
    2025-07-02 16:05:36.007 [REPO] Did not find an Id { ARP\Machine\X64\7-Zip }
    2025-07-02 16:05:36.012 [REPO] Skipping AddressBook because DisplayName is not a REG_SZ value
    2025-07-02 16:05:36.012 [REPO] Skipping Connection Manager because it is a SystemComponent
    2025-07-02 16:05:36.012 [REPO] Skipping DirectDrawEx because DisplayName is not a REG_SZ value
    2025-07-02 16:05:36.013 [REPO] Skipping DXM_Runtime because DisplayName is not a REG_SZ value
    2025-07-02 16:05:36.013 [REPO] Skipping Fontcore because DisplayName is not a REG_SZ value
    2025-07-02 16:05:36.013 [REPO] Skipping IE40 because DisplayName is not a REG_SZ value
    2025-07-02 16:05:36.013 [REPO] Skipping IE4Data because DisplayName is not a REG_SZ value
    2025-07-02 16:05:36.014 [REPO] Skipping IE5BAKEX because DisplayName is not a REG_SZ value
    2025-07-02 16:05:36.014 [REPO] Skipping IEData because DisplayName is not a REG_SZ value
    2025-07-02 16:05:36.014 [REPO] Adding manifest for [ARP\Machine\X64\IrfanView64, 4.72] at relative path []
    2025-07-02 16:05:36.015 [REPO] Did not find an Id { ARP\Machine\X64\IrfanView64 }
    2025-07-02 16:05:36.018 [REPO] Skipping MobileOptionPack because DisplayName is not a REG_SZ value
    2025-07-02 16:05:36.018 [REPO] Skipping MPlayer2 because DisplayName is not a REG_SZ value
    2025-07-02 16:05:36.018 [REPO] Skipping mstsc-4b0a31aa-df6a-4307-9b47-d5cc50009643 because DisplayName is not a REG_SZ value
    2025-07-02 16:05:36.019 [REPO] Adding manifest for [ARP\Machine\X64\O365ProPlusRetail - de-de, 16.0.18827.20164] at relative path []
    2025-07-02 16:05:36.019 [REPO] Did not find an Id { ARP\Machine\X64\O365ProPlusRetail - de-de }
    2025-07-02 16:05:36.025 [REPO] Adding manifest for [ARP\Machine\X64\OneDriveSetup.exe, 25.105.0601.0002] at relative path []
    2025-07-02 16:05:36.025 [REPO] Did not find an Id { ARP\Machine\X64\OneDriveSetup.exe }
    2025-07-02 16:05:36.029 [REPO] Skipping SchedulingAgent because DisplayName is not a REG_SZ value
    2025-07-02 16:05:36.030 [REPO] Adding manifest for [ARP\Machine\X64\Ultravnc2_is1, 1.6.4.0] at relative path []
    2025-07-02 16:05:36.030 [REPO] Did not find an Id { ARP\Machine\X64\Ultravnc2_is1 }
    2025-07-02 16:05:36.034 [REPO] Skipping WIC because DisplayName is not a REG_SZ value
    2025-07-02 16:05:36.035 [REPO] Adding manifest for [ARP\Machine\X64\{01E5F517-A390-379A-869D-FCDD8884EFF0}, 138.0.7204.97] at relative path []
    2025-07-02 16:05:36.035 [REPO] Did not find an Id { ARP\Machine\X64\{01E5F517-A390-379A-869D-FCDD8884EFF0} }
    2025-07-02 16:05:36.039 [REPO] Adding manifest for [ARP\Machine\X64\{052E6248-E030-4533-B125-CF3FAD937012}, 7.2.10.1217] at relative path []
    2025-07-02 16:05:36.039 [REPO] Did not find an Id { ARP\Machine\X64\{052E6248-E030-4533-B125-CF3FAD937012} }
    2025-07-02 16:05:36.044 [REPO] Adding manifest for [ARP\Machine\X64\{0EC05CD8-8D17-472C-86DA-AF1EA387256F}, 5.6.16] at relative path []
    2025-07-02 16:05:36.044 [REPO] Did not find an Id { ARP\Machine\X64\{0EC05CD8-8D17-472C-86DA-AF1EA387256F} }
    2025-07-02 16:05:36.049 [REPO] Adding manifest for [ARP\Machine\X64\{297FBA21-8D67-49B4-B9E5-58EA58D959BD}, 1.2.0] at relative path []
    2025-07-02 16:05:36.049 [REPO] Did not find an Id { ARP\Machine\X64\{297FBA21-8D67-49B4-B9E5-58EA58D959BD} }
    2025-07-02 16:05:36.053 [REPO] Skipping {90160000-007E-0000-1000-0000000FF1CE} because it is a SystemComponent
    2025-07-02 16:05:36.054 [REPO] Skipping {90160000-008C-0000-1000-0000000FF1CE} because it is a SystemComponent
    2025-07-02 16:05:36.054 [REPO] Skipping {90160000-008C-0407-1000-0000000FF1CE} because it is a SystemComponent
    2025-07-02 16:05:36.055 [REPO] Adding manifest for [ARP\Machine\X64\{A5AF5827-A2A0-4C8B-8ED1-48A148346399}, 24.2.471] at relative path []
    2025-07-02 16:05:36.055 [REPO] Did not find an Id { ARP\Machine\X64\{A5AF5827-A2A0-4C8B-8ED1-48A148346399} }
    2025-07-02 16:05:36.059 [REPO] Adding manifest for [ARP\Machine\X64\{A7AB73A3-CB10-4AA5-9D38-6AEFFBDE4C91}, 1.25.14602] at relative path []
    2025-07-02 16:05:36.059 [REPO] Did not find an Id { ARP\Machine\X64\{A7AB73A3-CB10-4AA5-9D38-6AEFFBDE4C91} }
    2025-07-02 16:05:36.064 [REPO] Adding manifest for [ARP\Machine\X64\{EA8CB806-C109-4700-96B4-F1F268E5036C}, 6.2.0.0] at relative path []
    2025-07-02 16:05:36.065 [REPO] Did not find an Id { ARP\Machine\X64\{EA8CB806-C109-4700-96B4-F1F268E5036C} }
    2025-07-02 16:05:36.069 [REPO] Adding manifest for [ARP\Machine\X64\{F03416B2-8C97-4CC4-8578-5F6A58238B84}, 5.8.11] at relative path []
    2025-07-02 16:05:36.070 [REPO] Did not find an Id { ARP\Machine\X64\{F03416B2-8C97-4CC4-8578-5F6A58238B84} }
    2025-07-02 16:05:36.074 [REPO] Examining ARP entries for Machine | X86
    2025-07-02 16:05:36.074 [REPO] Skipping AddressBook because DisplayName is not a REG_SZ value
    2025-07-02 16:05:36.075 [REPO] Skipping Connection Manager because it is a SystemComponent
    2025-07-02 16:05:36.075 [REPO] Skipping DirectDrawEx because DisplayName is not a REG_SZ value
    2025-07-02 16:05:36.075 [REPO] Skipping DXM_Runtime because DisplayName is not a REG_SZ value
    2025-07-02 16:05:36.076 [REPO] Skipping Fontcore because DisplayName is not a REG_SZ value
    2025-07-02 16:05:36.076 [REPO] Skipping IE40 because DisplayName is not a REG_SZ value
    2025-07-02 16:05:36.076 [REPO] Skipping IE4Data because DisplayName is not a REG_SZ value
    2025-07-02 16:05:36.077 [REPO] Skipping IE5BAKEX because DisplayName is not a REG_SZ value
    2025-07-02 16:05:36.077 [REPO] Skipping IEData because DisplayName is not a REG_SZ value
    2025-07-02 16:05:36.077 [REPO] Skipping Microsoft Edge Update because DisplayName is not a REG_SZ value
    2025-07-02 16:05:36.077 [REPO] Skipping Microsoft EdgeWebView because it is a SystemComponent
    2025-07-02 16:05:36.078 [REPO] Skipping MobileOptionPack because DisplayName is not a REG_SZ value
    2025-07-02 16:05:36.078 [REPO] Skipping MPlayer2 because DisplayName is not a REG_SZ value
    2025-07-02 16:05:36.079 [REPO] Adding manifest for [ARP\Machine\X86\PDQ RD Agent_is1, 4.4.2447.10] at relative path []
    2025-07-02 16:05:36.079 [REPO] Did not find an Id { ARP\Machine\X86\PDQ RD Agent_is1 }
    2025-07-02 16:05:36.083 [REPO] Skipping SchedulingAgent because DisplayName is not a REG_SZ value
    2025-07-02 16:05:36.084 [REPO] Skipping WIC because DisplayName is not a REG_SZ value
    2025-07-02 16:05:36.084 [REPO] Adding manifest for [ARP\Machine\X86\{04201224-2B34-4EE7-862B-B7BBF89DB3AB}, 11.17.1029.2024] at relative path []
    2025-07-02 16:05:36.085 [REPO] Did not find an Id { ARP\Machine\X86\{04201224-2B34-4EE7-862B-B7BBF89DB3AB} }
    2025-07-02 16:05:36.090 [REPO] Adding manifest for [ARP\Machine\X86\{8B64BAA0-53F2-4ECB-9E5A-21136398C770}, 1.91.102.0] at relative path []
    2025-07-02 16:05:36.090 [REPO] Did not find an Id { ARP\Machine\X86\{8B64BAA0-53F2-4ECB-9E5A-21136398C770} }
    2025-07-02 16:05:36.095 [REPO] Adding manifest for [ARP\Machine\X86\{989EF560-5890-4073-AC83-7B06F39F2C60}, 7.0.14] at relative path []
    2025-07-02 16:05:36.095 [REPO] Did not find an Id { ARP\Machine\X86\{989EF560-5890-4073-AC83-7B06F39F2C60} }
    2025-07-02 16:05:36.101 [REPO] Adding manifest for [ARP\Machine\X86\{BB2BD73E-457A-3144-B567-0A313E460166}, 138.0.3351.65] at relative path []
    2025-07-02 16:05:36.101 [REPO] Did not find an Id { ARP\Machine\X86\{BB2BD73E-457A-3144-B567-0A313E460166} }
    2025-07-02 16:05:36.105 [REPO] Examining MSIX entries for Machine
    2025-07-02 16:05:36.113 [FAIL] WindowsPackageManager.dll!00007FFD8812FB1F: LogHr(1) tid(411c) 80070005 Zugriff verweigert
    
    
    2025-07-02 16:05:36.455 [CLI ] Caught winrt::hresult_error: 0x80070005 : Zugriff verweigert
    

    This is very annoying because I want to always install everything as machine-scope, so I always use the explicit parameter. As noted in the issue, the installs succeed when --scope machine is omitted but that also risks getting a user-scope install so it's not an option.

  10. jantari commented on Jul 17, 2025

    @jantari

    Tested again on Windows 10 22H2 10.0.19045.6093 and Windows 11 24H2 10.0.26100.4652. Issue reproduces on both with latest winget 1.11.400. Same error in the verbose logs, just different offsets and the Windows 10 log has 2 consecutive blank lines:

    Windows 10:

    [REPO] Examining MSIX entries for Machine
    [FAIL] WindowsPackageManager.dll!00007FFB093BFB1F: LogHr(1) tid(35cc) 80070005 Zugriff verweigert
    
    
    [CLI ] Caught winrt::hresult_error: 0x80070005 : Zugriff verweigert
    

    Windows 11:

    [REPO] Examining MSIX entries for Machine
    [FAIL] WindowsPackageManager.dll!00007FFA5100FB1F: LogHr(1) tid(3de0) 80070005 Zugriff verweigert
     
    [CLI ] Caught winrt::hresult_error: 0x80070005 : Zugriff verweigert
    

    It would seem that the cause is once again the same exact method call that already caused #5318:

    packages = packageManager.FindProvisionedPackages();

    as calling this method in an unelevated PowerShell session causes the same "Access is denied" exception:

    ~
    ❯ [Windows.Management.Deployment.PackageManager,Windows.Management.Deployment,ContentType=WindowsRuntime]
    
    IsPublic IsSerial Name                                     BaseType
    -------- -------- ----                                     --------
    True     False    PackageManager                           System.Runtime.InteropServices.WindowsRuntime.RuntimeClass
    
    
    
    ~
    ❯ [Windows.Management.Deployment.PackageManager]::new().FindProvisionedPackages()
    Ausnahme beim Aufrufen von "FindProvisionedPackages" mit 0 Argument(en):  "Zugriff verweigert
    Zugriff verweigert
    "
    In Zeile:1 Zeichen:1
    + [Windows.Management.Deployment.PackageManager]::new().FindProvisioned ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
        + FullyQualifiedErrorId : UnauthorizedAccessException
    

    So it looks like this method can only be used when running with elevated privileges, but instead of self-elevating or presenting a user-friendly error winget just crashes.

    Btw, I don't understand how this is not a higher priority. The number one feature of winget, installing packages, has been crashing for over 1 year and all it takes to reproduce is winget install --id SlackTechnologies.Slack --scope machine. I've been considering just perma-looping this command across dozens of Cores & VMs just to spam telemetry and get eyes on it, but at the same time I don't want to be nuisance.

    JohnMcPMS since you worked on this code path, maybe you can sneak in another if elevated or just try-catch it and return a better error to the user if non-elevated/access denied? Thanks in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Command-InstallIssue related to WinGet InstallIssue-BugIt either shouldn't be doing this or needs an investigation.

    Type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions