microsoft / microsoft/winget-cli

Winget is broken with BlockNonAdminUserInstall being set

Open
#6,499 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Command-Install Command-Repair Command-Upgrade Issue-Bug
Dominant language
C++
Stars
26.4k
Forks
1.8k
Avg merge
1d 11h
Merged PRs (30d)
15

Description

Relevant area(s)

WinGet CLI

Relevant command(s)

winget install, winget upgrade, winget repair

Brief description of your issue

On machines with BlockNonAdminUserInstall = 1 being set, its impossible to use winget

Steps to reproduce

Our IT provisions our developer machines with an ENTRA/firstName.lastName account without admin rights and sets HKLM:\SOFTWARE\Microsoft\PolicyManager\current\device\ApplicationManagement\BlockNonAdminUserInstall = 1 via Intune.
They grant us the ability to install software via a secondary ENTRA/adm-firstName.lastName account with admin rights.

Trying to use winget install for anything on the winget source leads to

Unexpected error while executing the command:
0x8a15000f : Data required from the source is missing

This is due to AddPackage on the Microsoft.Winget.Source failing with 0x80070005 (access denied).
Since this is a per-user package, the adm account doesn't help here.

Expected behavior

Being able to install software with winget, if needed by using elevate.

Actual behavior

Installing software is impossible with BlockNonAdminUserInstall being set on a non admin account, even if a secondary admin account is available.

Environment
winget --info
Windows-Paket-Manager v1.29.280
© 2026 Microsoft. Alle Rechte vorbehalten.

Windows: Windows.Desktop v10.0.26200.9106
Systemarchitektur: X64
Paket: Microsoft.DesktopAppInstaller v1.29.280.0

WinGet-Verzeichnisse
-----------------------------------------------------------------------------------------------------------------------------------------
Protokolle                                   %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
Benutzereinstellungen                        %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
Verzeichnis für portierbare Links (Benutzer) %LOCALAPPDATA%\Microsoft\WinGet\Links
Portables Linkverzeichnis (Computer)         C:\Program Files\WinGet\Links
Portierbarer Paketstamm (Benutzer)           %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portierbarer Paketstamm                      C:\Program Files\WinGet\Packages
Portierbares Paketstamm (x86)                C:\Program Files (x86)\WinGet\Packages
Installationsprogrammdownloads               %USERPROFILE%\Downloads
Konfigurationsmodule                         %LOCALAPPDATA%\Microsoft\WinGet\Configuration\Modules

Links
-----------------------------------------------------------------------------------------
Datenschutzerklärung              https://aka.ms/winget-privacy
Lizenzvereinbarung                https://aka.ms/winget-license
Hinweise von Drittanbietern       https://aka.ms/winget-3rdPartyNotice
Startseite                        https://aka.ms/winget
Windows Store-Nutzungsbedingungen https://www.microsoft.com/en-us/storedocs/terms-of-sale

Administratoreinstellung                  Status
-----------------------------------------------------
LocalManifestFiles                        Deaktiviert
BypassCertificatePinningForMicrosoftStore Deaktiviert
InstallerHashOverride                     Deaktiviert
LocalArchiveMalwareScanOverride           Deaktiviert
ProxyCommandLineOptions                   Deaktiviert
ConfigurationProcessorPath                Deaktiviert
DefaultProxy                              Deaktiviert

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with winget install, winget upgrade, and winget repair while BlockNonAdminUserInstall is set, and review the reported AddPackage access-denied failure. Trace how the WinGet source package is added for a non-admin user and how elevation is handled. Done means the commands can install software when a secondary administrator account is available.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, powershell
Domain
cli, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.