KEMBAR78
Access denied error when using --scope machine on standard user · Issue #4410 · microsoft/winget-cli · GitHub
Skip to content

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

@github-account1111

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

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

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions