microsoft / microsoft/winget-cli
Support for installers that make long log file names
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 26.4k
- Forks
- 1.8k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 15
Description
Description of the new feature / enhancement
Some installers append additional characters to the log file path that we give, and the default log file path already long to begin with. The default path is in a location that makes submitting feedback via Feedback Hub collect them so that we can better diagnose problems, so we don't want to change that.
If the installer makes the path longer without using the proper Windows-isms for long path support, it can fail to install seemingly at random due to the length of the user account string, version, etc.
We should consider creating a symlink in %TEMP% that points to our default location and pass that instead.
Proposed technical implementation details
Create a symlink in %TEMP% that points to the default log location and use that path instead.
Current default:
%LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
Proposed symlink name (actually the result of GetTempPathW):
%LOCALAPPDATA%\Temp\WinGet\Logs
Which will save 61 characters, or about 25% of MAX_PATH.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the code that defines the default log location and passes it to installers, then review how GetTempPathW and Windows symlinks can represent the proposed %TEMP%\WinGet\Logs path. Done means installers receive the shorter path while logs remain available in the existing default location for Feedback Hub collection.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli, operating-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100