Skip to content

Cannot update sources with Administrator promt #3082

Open

Description

@simkoG

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

Activity

  1. added
    Issue-Bug
    and removed
    Needs-Triage
    on Mar 16, 2023
  2. added this to the milestone on Jun 5, 2023
  3. added
    Command-Source
    on Jun 10, 2023
  4. Alarith commented on Aug 8, 2023

    @Alarith

    I have the same issue. I work in a domain without local admin rights. I can start winget as a normal user and everything works fine, but I need to enter the admin credentials for every software updated (A workaround might be to cache the authorization). When I use the "run as administrator" function on powershell and then start winget, I get the searching for sources error.#
    A solution for this issue would be greatly appreciated :).

  5. removed this from the milestone on Nov 14, 2024
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-SourceIssue-Bug

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions