microsoft / microsoft/winget-cli
path is not properly set on scope machine on fresh windows install
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 26.4k
- Forks
- 1.8k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 15
Description
Brief description of your issue
if a cli package needs dlls, the flag ArchiveBinariesDependOnPath is set to true and the directory is added to path to ensure the dlls are found.
this feature is introduced here: https://github.com/microsoft/winget-cli/pull/4816
this usually works.
i now noticed that on a fresh windows 11 machine this does not work.
on another machine where i used winget a lot it works as expected. dont know where it gets fixed along the way. at least its easy to reproduce.
i originally described the issue here:
https://github.com/microsoft/winget-pkgs/issues/246428
but it might be more relevant here than in the ffmpeg package.
Steps to reproduce
on a freshly installed windows machine open an admin terminal and:
winget install Gyan.FFmpeg.Shared -e --silent --accept-package-agreements --accept-source-agreements --scope machine
rem check the path and it will not be set
path
rem run the program and you will get erros that it can not find dlls
ffmpeg
Expected behavior
path of the bin directory "C:\Program Files\WinGet\Packages\Gyan.FFmpeg.Shared_Microsoft.Winget.Source_8wekyb3d8bbwe\ffmpeg-7.1.1-full_build-shared\bin" should be added to the path.
Actual behavior
path of executable is not added to global path.
Environment
Windows Package Manager v1.10.340
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.26100.3476
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.25.339.0
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
Reproduce the issue on a fresh Windows 11 machine using the reported winget install Gyan.FFmpeg.Shared -e --silent --accept-package-agreements --accept-source-agreements --scope machine command. Check the resulting global PATH and run ffmpeg; done means the package's bin directory is added to PATH and the executable can find its DLLs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100