Skip to content

Unable to install programs which require Admin #2740

Closed

Description

Brief description of your issue

Winget is unable to install programs which require Admin.
Winget disables inheritance on the C:\Users\username\AppData\Local\Temp\WinGet folder so the administrator accounts can't access it.
Even after manually enabling inheritance, the next winget install disables it again and fails.

Steps to reproduce

winget install any program that requires an Admin password

Expected behavior

The program installs.

Actual behavior

The program fails installing with the error The network name cannot be found, or similar.

Environment

Windows Package Manager (Preview) v1.4.3132-preview
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.19045.2311
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.19.3132.0

Activity

  1. ghost added
    Needs-Triage
    on Dec 4, 2022
  2. denelon commented on Dec 5, 2022

    @denelon
    Collaborator

    filiphorvat (@filiphorvat) Can you run an instance of this with winget install <package> --verbose-logs and share the log file? The location is displayed via winget --info.

  3. added
    Issue-Bug
    Needs-Author-Feedback
    and removed
    Needs-Triage
    on Dec 5, 2022
  4. filiphorvat commented on Dec 5, 2022

    @filiphorvat
    Author

    Here it is for winget install wiztree --verbose-logs:
    WinGet-2022-12-05-18-22-32.594.log
    Looks like this after typing in the admin password:
    image

    Or like this when installing Steam:
    image
    Here's the log for Steam:
    WinGet-2022-12-05-18-34-06.014.log
    Even manually running the installer from the temp directory doesn't work if I don't re-enable inheritance.

  5. ghost added
    Needs-Attention
    on Dec 5, 2022
  6. ghost removed
    Needs-Author-Feedback
    on Dec 5, 2022
  7. jueti commented on Dec 20, 2022

    @jueti

    same as me, my settings via winget settings

    winver: Windows Server 2022 Standard 21H2 20348.1311

    {
        "$schema": "https://aka.ms/winget-settings.schema.json",
    
        // For documentation on these settings, see: https://aka.ms/winget-settings
        // "source": {
        //    "autoUpdateIntervalInMinutes": 5
        // },
        "telemetry": {
            "disable": true
        },
        "network": {
            "downloader": "wininet"
        },
        "source": {
            "autoUpdateIntervalInMinutes": 360
        },
        //"logging": {
        //    "level": "verbose"
        //},
        "installBehavior": {
            "preferences": {
                "scope": "machine"
            }
        }
    }
  8. AlexDe74 commented on Jan 10, 2023

    @AlexDe74

    same as here #2665

    MS ignores it.

    To install any programs with EXE Installers I do:

    1. Try first time winget update --id....
    2. Go into %TEMP%\Winget\
    3. Give to Administrator the permissions to access the applications's folder in %TEMP%\Winget
    4. Try second time winget upgrade --id...

    Really good user experience....

  9. ghborger commented on Feb 1, 2023

    @ghborger

    The same behavior for me on Windows 11. Normal user without administrator rights tries to install a program with winget. Winget loads the installation files
    to C:\Users\USERNAME\AppData\Local\Temp\WinGet, sets own permissions. Full access for the current account and system and removes inheritance. The local administrator has no rights to the directory. Then WinGet requests the administrator rights. After that winget aborts with an error that it cannot access the installation files. Which was predictable if the local administrator lacks the rights. Apparently the Winget developers always work with administrator rights, otherwise they would have noticed the error immediately.

  10. rand0muser123 commented on Feb 2, 2023

    @rand0muser123

    Can confirm we are able to replicate it on our tenant with onenote as it uses an exe
    As a workaround we are downloading it from the ms website
    It happens both on the store or through winget

  11. boozeman commented on Feb 2, 2023

    @boozeman

    Hi,

    How about the feature where you can set the download directory for winget packages in settings file? Some directory where all the users has rw-rights.

  12. nk111 commented on Apr 18, 2023

    @nk111

    I can confirm that this is fixed in 1.5 preview of winget. I really wonder why this bug even made it to a release. Does nobody really work without admin rights?

  13. removed
    Needs-Attention
    on Apr 18, 2023
  14. Masamune3210 commented on Apr 18, 2023

    @Masamune3210

    I can confirm that this is fixed in 1.5 preview of winget. I really wonder why this bug even made it to a release. Does nobody really work without admin rights?

    Principle of least privilege says you shouldn't

  15. UnidentifiedTag commented on Jun 28, 2023

    @UnidentifiedTag

    same error Windows 11 22H2

    the administrator account is being removed from the winget folder found in the temp folder every time the store reloads, why is this happening, Microsoft should be keeping the administrator privileges on this folder?

    error

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

    Issue-Bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions