Repository navigation
Conversation
This comment has been minimized.
This comment has been minimized.
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The test assertion causes a warnings-as-errors build failure, and the log-path fallback removes unrelated installer options, potentially making installation interactive or causing it to fail.
2 open issues
What changed in this PR
This PR mitigates installer log path limits reported in #2036 by shortening automatically generated names while leaving room for installer-added suffixes.
Changes:
- Adds progressive filename shortening and short-GUID fallbacks, omitting logging when no automatic path fits.
- Introduces explicit manifest version-inclusion strategies and tests path budgets, Unicode boundaries, and bypass behavior.
- Documents the policy and adds a warning for unavailable log paths.
| File | Description |
|---|---|
| src/AppInstallerCommonCore/Public/winget/Manifest.h | Declares version-inclusion strategies for manifest path parts. |
| src/AppInstallerCommonCore/Manifest/Manifest.cpp | Implements version-inclusion selection. |
| src/AppInstallerCLITests/YamlManifest.cpp | Tests version strategies and path sanitization. |
| src/AppInstallerCLITests/InstallFlow.cpp | Tests shortening, fallbacks, Unicode, and explicit-path bypasses. |
| src/AppInstallerCLIPackage/Shared/Strings/en-us/winget.resw | Adds the log-path-unavailable warning. |
| src/AppInstallerCLICore/Workflows/ShellExecuteInstallerHandler.cpp | Implements path budgeting and argument-fragment handling. |
| src/AppInstallerCLICore/Workflows/DownloadFlow.cpp | Adopts the explicit drop-unknown-version strategy. |
| src/AppInstallerCLICore/Resources.h | Registers the new warning resource. |
| doc/Settings.md | Documents automatic log naming and limits. |
| doc/release-notes/1.31/2036-shorter-installer-log-paths.md | Adds a user-facing release note. |
Review effort: Balanced
This comment was marked as outdated.
This comment was marked as outdated.
Javis j Garcia (reapergarcia057)
approved these changes
Nov 12, 2026
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.


📖 Description
The default/
manifestinstaller log file naming strategy will now progressively fall back to lower detail in the file name in an attempt to keep the path length at or under 150 characters. This is fairly aggressive when running packaged, leaving only 25 characters for the username, package id, and version for the longest file name format.The formats attempted are:
YY-MM-DD-hh-mm-ss+ ".log"a. 25 characters for username, package id, version
YYMMDDhhmmss+ ".log"a. 31 characters for username, package id
hhmmss+ ".log"a. 37 characters for username, package id substring
shortGuidstrategyAlso uses the
shortGuidstrategy if the configured strategy would result in a path longer thanMAX_PATHsupports. And if even that would be too long, removes the log file from the install request.🔗 References
#2036
🔍 Validation
Added unit tests for file name selection.
Microsoft Reviewers: Open in CodeFlow