winget-cli icon indicating copy to clipboard operation
winget-cli copied to clipboard

Cannot install anything under user account without administrative permissions

Open AlexDe74 opened this issue 3 years ago • 0 comments

Brief description of your issue

When installing under an user account without an administrative permissions, any applications requiring an elevated privileges are failed to install with Installer failed with exit code: 1223

Steps to reproduce

  1. create c:\temp and give a full permissions to Users and Administrators of local Windows
  2. set TMP=C:\TEMP
  3. winget install onenote --source msstore
  4. Confirm
  5. Enter an Administrator account password

Installation is failed

Expected behavior

The application can be installed under an user account, when entering an administrative permissions

Actual behavior

Installation is failed with "Windows cannot access c:\temp\winget...\download.exe

The permission analyse shows following: before installing, c:\temp is empty with following permissions:

PS C:\Users\alex> get-acl C:\temp | Format-list

Path : Microsoft.PowerShell.Core\FileSystem::C:\temp Owner : BUILTIN\Administrators Group : WINPC\alex Access : BUILTIN\Administrators Allow FullControl BUILTIN\Users Allow FullControl

After installing (with an error message, described above) c:\temp\winget has the following permissions:

PS C:\Users\alex> get-acl C:\temp\winget | Format-list

Path : Microsoft.PowerShell.Core\FileSystem::C:\temp\winget Owner : WINPC\alex Group : WINPC\alex Access : NT AUTHORITY\SYSTEM Allow 268435456 NT AUTHORITY\SYSTEM Allow FullControl WINPC\alex Allow 268435456 WINPC\alex Allow FullControl

Cancelling of the installation process shows this error

image

Environment

winget --info

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

Windows: Windows.Desktop v10.0.22623.875
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.19.2161.0

AlexDe74 avatar Nov 04 '22 06:11 AlexDe74