microsoft / microsoft/winget-cli

Winget fails to open source package in elevated session using admin account that cannot log on locally

Open
#698 10 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue-Feature
Dominant language
C++
Stars
26.4k
Forks
1.8k
Avg merge
1d 11h
Merged PRs (30d)
15

Description

Brief description of your issue

I'm trying to setup winget on a new laptop, but I'm running into the following error:

Failed to open the source; try the 'source reset' command if the problem persists.
An unexpected error occurred while executing the command:
0x8a15000f : Data required by the source is missing

Steps to reproduce

My laptop was installed by the corporation with Windows 10 Enterprise. My account does not have local admin rights, but I also have an admin account that I can use for elevation. The admin account does not have the right to log on locally -- it is only for elevation purposes.

To install winget, I have to sideload it because I do not have access to the store. I signed up my account for the preview flight ring for the app installer, downloaded the appxbundle for the latest winget package, and then set it up by doing the following in PowerShell:

# From an elevated PowerShell session (my local admin account):
Add-AppxProvisionedPackage ./Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.appxbundle
Add-AppxPackage ./Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.appxbundle

# From a non-admin PowerShell session (my login account):
Add-AppxPackage ./Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.appxbundle

Once this is set up, from my login account in a non-elevated PowerShell session I can use winget as expected; however, if I am in an elevated session using my admin account, winget always returns the error shown above.

I have reset the source as the error recommends, but the problem persists.

I have also used Get-AppxPackage to see what packages are installed for each of the two accounts. I can see a Microsoft.Winget.Source package for the logon user account, but not for the admin account. I presume that is the crux of the problem -- that the elevation account does not have a Microsof.Winget.Source package, and that winget cannot work without it.

Please advise how I can get this set up properly in my work environment.

Expected behavior

winget should work properly in both my login account as well as in an elevated session that leverages my admin account.

Actual behavior

winget only works properly in my login account.

Environment

[winget --info]
Windows Package Manager v0.2.3162 Preview
Windows: Windows.Desktop v10.0.18363.1256 (version 1909)
Package: Microsoft.DesktopAppInstaller v1.11.3162.0

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 failure with the elevated PowerShell session and the admin account that cannot log on locally, then compare the AppX packages reported by Get-AppxPackage for both accounts. The issue is resolved when winget can open its source in both the normal login session and the elevated admin session.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
cli, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.