Repository navigation
Resolve junctions in the elevated WinGet TEMP folder - #5526
Merged
Gabriel Dufresne (GabrielDuf) merged 3 commits intoOct 16, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Cache synchronization and test portability need correction, and published NativeAOT validation of the elevated Scoop installation flow remains outstanding.
2 open findings
What changed in this PR
Resolves linked directories in elevated WinGet’s temporary path to address Scoop installations failing with Error 448 while preserving portable storage.
Changes:
- Resolves Windows junctions and symlinks while preserving missing path segments.
- Centralizes TEMP/TMP redirection across ten call sites.
- Adds resolver and environment-variable tests.
| File | Description |
|---|---|
| src/UniGetUI.PackageEngine.Operations/AbstractProcessOperation.cs | Uses shared TEMP redirection. |
| src/UniGetUI.PackageEngine.Managers.WinGet/WinGet.cs | Centralizes elevated WinGet environment setup. |
| src/UniGetUI.PackageEngine.Managers.WinGet/ClientHelpers/WinGetCliHelper.cs | Redirects CLI calls through the shared helper. |
| src/UniGetUI.PackageEngine.Managers.WinGet/ClientHelpers/PingetPackageDetailsProvider.cs | Updates elevated package-details TEMP handling. |
| src/UniGetUI.PackageEngine.Managers.WinGet/ClientHelpers/PingetCliHelper.cs | Updates elevated Pinget TEMP handling. |
| src/UniGetUI.Core.Logging.Tests/AppPathsTests.cs | Adds linked-path and TEMP/TMP tests. |
| src/UniGetUI.Core.Logger/AppPaths.cs | Adds Windows path resolution, caching, and redirection. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
🤖 Pull request was approved automatically: the AI review is complete and all its review threads are resolved. 🎉
Integration Details
{
"deliveryId": "991b93f0-c964-11f1-9fe9-bb5fd8a8613a",
"headSha": "64f655500fd04e77ef26a63aedeb7c52b747d1ed",
"reviewer": "copilot-pull-request-reviewer[bot]"
}
Gabriel Dufresne (GabrielDuf)
deleted the
fix-5518-elevated-temp-junction
branch
October 16, 2026 14:18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Problem
Since #5343, portable mode hands elevated WinGet a
%TEMP%of<install dir>\Settings\Temp\ElevatedWinGetTemp. Scoop installs UniGetUI as portable, and bothapps\unigetui\currentand the persistedSettingsfolder are junctions created by a non-admin user.Inno Setup 6.7+ and 7.x installers turn on RedirectionGuard in enforcing mode in their own setup process. That makes them refuse to traverse an untrusted mount point, so creating their
is-*.tmpworking folder fails with:Fix
AppPaths.ElevatedTempDirectoryopens the deepest existing folder on the path and asksGetFinalPathNameByHandleWfor its final path. That resolves every junction and symlink in one call, keeps the not-yet-created tail, and strips\\?\/\\?\UNC\the same wayShortcutFileRemoveralready does. If the folder can't be opened, it logs a warning and falls back to the unresolved path.TEMP/TMPby hand now callAppPaths.RedirectTempToElevatedDirectory(startInfo), so the elevated environment can't drift between them.Testing
TEMPpointed through Scoop-stylemklink /Jjunctions. Both show the reporter's exact Error 448, and their/LOGreportsRedirectionGuard status for current process: Enabled in enforcing mode. With the resolved path, both reach the license page. Fort Firewall itself couldn't be run past its OS check because the test machine is ARM64.GetFinalPathNameByHandleW. The new junction test shows it resolves to the samepersist\...path that worked.AppPathsTestscover junctions, symlinks, the missing-tail case and the TEMP/TMP helper. All 16 tests inUniGetUI.Core.Logging.Testspass.dotnet format whitespaceandstyleboth pass.Not tested end to end with a Scoop-installed UniGetUI build.
Closes #5518