microsoft / microsoft/winget-cli

Cannot update sources with Administrator promt

Open
#3,082 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Brief description of your issue

We have a small office with about ten computers. I am using Winget to keep my apps up-to-date. All these machines have an administrator account and a standard user. I only use the administrator account if it's necessary. I just log in as the standard user for every day usage.

The problem is that I cannot update the winget sources with an elevated command prompt. Because of this, I cannot use winget to upgrade all my apps with a single command.

If I run a command prompt without admin rights, I will have to type my password for every application upgrade. With ten computers and about five applications it's a nightmare, just to think about it.

Steps to reproduce
  1. Create a "Standard" and an "Administrator" Windows user.
  2. log in to the "Standard" user.
  3. Run the cmd.exe with admin rights.
  4. winget source update.
  5. The winget source will be stuck at 0% and returns a Done message.
  6. winget upgrade will output: No installed package found matching input criteria.
  7. Run the cmd-exe without admin rights.
  8. winget source update.
  9. winget upgrade --all will update the applications now, but you will have to log in to the admin account for every application install.
Expected behavior

Be able to update winget sources with the admin command prompt.

Actual behavior

I can only update the sources with a non-admin command prompt.

admin prompt non-admin prompt
01 02
Environment
> winget --info
Windows Package Manager v1.3.2691
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.19045.2604
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.18.2691.0

Logs: %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir

Links
---------------------------------------------------------------------------
Privacy Statement   https://aka.ms/winget-privacy
License Agreement   https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage            https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale

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

Reproduce the behavior with separate standard and administrator Windows users using winget source update and winget upgrade. Start with the diagnostic files under %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir, comparing elevated and non-elevated runs. Done means an elevated prompt updates sources successfully and winget upgrade --all finds installed packages.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.