Skip to content

fix: fall back to non-packaged app root when no AppX identity#19

Merged
Gabriel Dufresne (GabrielDuf) merged 2 commits into
masterfrom
fix-access-denied
May 12, 2026
Merged

fix: fall back to non-packaged app root when no AppX identity#19
Gabriel Dufresne (GabrielDuf) merged 2 commits into
masterfrom
fix-access-denied

Conversation

@GabrielDuf
Copy link
Copy Markdown
Contributor

pinget unconditionally pointed its default app root at the WinGet packaged LocalState, so any first-run command from a non-packaged, non-elevated process tried to create
%ProgramData%\Microsoft\WinGet{sid}\settings\pkg... and failed with "Access is denied" — making pinget unusable when bundled by callers like UniGetUI. Detect package identity via GetCurrentPackageFullName and, when absent, default the app root to %LOCALAPPDATA%\Devolutions\ Pinget; PINGET_APPROOT still opts a packaged caller back into the WinGet LocalState layout.

pinget unconditionally pointed its default app root at the WinGet
packaged LocalState, so any first-run command from a non-packaged,
non-elevated process tried to create
%ProgramData%\Microsoft\WinGet\{sid}\settings\pkg\... and failed with
"Access is denied" — making pinget unusable when bundled by callers
like UniGetUI. Detect package identity via GetCurrentPackageFullName
and, when absent, default the app root to %LOCALAPPDATA%\Devolutions\
Pinget; PINGET_APPROOT still opts a packaged caller back into the
WinGet LocalState layout.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Mirrors the Rust fix in NormalizeAppRoot: detect AppX package identity
via GetCurrentPackageFullName and, when absent, default the app root to
%LOCALAPPDATA%\Devolutions\Pinget instead of WinGet's SYSTEM-owned
secure-settings location under %ProgramData%\Microsoft\WinGet\{sid}\
settings\pkg\Microsoft.DesktopAppInstaller. This keeps the dotnet tool
and PowerShell module usable from non-packaged, non-elevated callers.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@GabrielDuf Gabriel Dufresne (GabrielDuf) merged commit e12fc2f into master May 12, 2026
13 checks passed
@GabrielDuf Gabriel Dufresne (GabrielDuf) deleted the fix-access-denied branch May 12, 2026 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants