Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Package Issue]: Notepad++.Notepad++ - Elevated User No Perms on $env:Temp\Winget #2927

Open
2 tasks done
mattcargile opened this issue Feb 3, 2023 · 2 comments
Open
2 tasks done
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation.

Comments

@mattcargile
Copy link

mattcargile commented Feb 3, 2023

Please confirm these before moving forward

  • I have searched for my issue and not found a work-in-progress/duplicate/resolved issue.
  • I have not been informed if the issue is resolved in a preview version of the winget client.

Category of the issue

Installation issue.

Brief description of your issue

I couldn't upgrade Notepad++ because my elevated user could not access my current users $env:TEMP\Winget folder.

I run winget upgrade --id Notepad++.Notepad++ --exact as a non Administrator ( e.g. not in the Administrators group). winget writes out the npp installer to $env:TEMP\WinGet. The UAC prompt asks me to elevate which I do as another local user. The upgrade fails because it can't touch the aforementioned folder. This folder's permissions are automatically set and reset upon each run to only be accessible by SYSTEM or the current user.

Steps to reproduce

winget upgrade --id Notepad++.Notepad++ --exact as a non-Admin user and then elevate with a different local user.

Actual behavior

Installer fails with a pop-up that it can't access the path.

Expected behavior

Upgrade should complete successfully.

Environment

Windows Package Manager v1.4.10173
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.19045.2486
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.19.10173.0

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

User Settings: %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json

Screenshots and Logs

No response

Workaround

I used add-localgroupMember -Member 'user' -Group 'Administrators' and then did winget upgrade and then remove-localgroupmember -Member 'user' -Group 'Administrators'.

@mattcargile mattcargile added the Issue-Bug It either shouldn't be doing this or needs an investigation. label Feb 3, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage Issue need to be triaged label Feb 3, 2023
@denelon denelon removed the Needs-Triage Issue need to be triaged label Feb 3, 2023
@Trenly
Copy link
Contributor

Trenly commented Feb 4, 2023

@denelon - This seems like a cli bug

Related to #2370 and #2324

@denelon denelon transferred this issue from microsoft/winget-pkgs Feb 6, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage Issue need to be triaged label Feb 6, 2023
@denelon denelon removed the Needs-Triage Issue need to be triaged label Feb 6, 2023
@designatedsuccessor
Copy link

designatedsuccessor commented Feb 8, 2023

I am not positive, but this seems like it is related to a comment that I just put in this issue:

#2123

Also, for what it's worth, I am not using the CLI. I am using the graphical Microsoft Store. But I almost don't think it's even related to that, either, because I can literally stick any *.exe file in the Temp\WinGet folder and have the same problem. There is something unique to the WinGet directory that causes this. It almost seems like something in Windows itself is treating this directory differently. I can copy an *.exe from the WinGet folder and put it inside the general Temp folder and not have this issue.

I originally noticed this issue with OneNote and VLC Player, which also use *.exe files to install.

@denelon denelon added this to the v1.5-Client milestone Feb 14, 2023
@denelon denelon added this to WinGet Feb 14, 2023
@denelon denelon modified the milestones: v1.5-Client, v.Next-Client Apr 18, 2023
@denelon denelon removed this from WinGet Jun 13, 2023
@denelon denelon removed this from the v.Next-Client milestone Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation.
Projects
None yet
Development

No branches or pull requests

4 participants