microsoft / microsoft/winget-cli
Path environment variable modification does not actually modify PATH.
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 26.4k
- Forks
- 1.8k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 15
Description
Relevant area(s)
WinGet CLI
Relevant command(s)
winget install
Brief description of your issue
I was trying to add the latest version of x64dbg to winget. There is no installer, so you have to use the portable installation from a ZIP.
Note: not a duplicate of #549, this is a bug with the PATH not getting modified when it should be.
Steps to reproduce
Checkout https://github.com/microsoft/winget-pkgs/pull/285465
C:\winget-pkgs>winget install --manifest manifests\x\x64dbg\x64dbg\2025.08.19
Found x64dbg [x64dbg.x64dbg] Version 2025.08.19
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Successfully verified installer hash
Extracting archive...
Successfully extracted archive
Starting package install...
Path environment variable modified; restart your shell to use the new value.
Command line alias added: "x96dbg"
Command line alias added: "x32dbg"
Command line alias added: "x64dbg"
Successfully installed
Restart cmd.exe from explorer:
C:\CodeBlocks\winget-pkgs>where x64dbg
INFO: Could not find files for the given pattern(s).
C:\CodeBlocks\winget-pkgs>where x32dbg
INFO: Could not find files for the given pattern(s).
The package is installed correctly in C:\Users\Admin\AppData\Local\Microsoft\WinGet\Packages\x64dbg.x64dbg__DefaultSource\release\x64\x64dbg.exe, so it is the PATH modification logic that fails
Expected behavior
I would expect the PATH to get modified to include the following folders:
C:\Users\Admin\AppData\Local\Microsoft\WinGet\Packages\x64dbg.x64dbg__DefaultSource\releaseC:\Users\Admin\AppData\Local\Microsoft\WinGet\Packages\x64dbg.x64dbg__DefaultSource\release\x64C:\Users\Admin\AppData\Local\Microsoft\WinGet\Packages\x64dbg.x64dbg__DefaultSource\release\x32
It works fine with the yt-dlp package:
C:\CodeBlocks\winget-pkgs>winget install --manifest manifests\y\yt-dlp\yt-dlp\2025.08.11
Found yt-dlp [yt-dlp.yt-dlp] Version 2025.08.11
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
This package requires the following dependencies:
- Packages
yt-dlp.FFmpeg
(1/1) Found FFmpeg for yt-dlp [yt-dlp.FFmpeg] Version N-120424-g03b9180fe3-20250731
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://github.com/yt-dlp/FFmpeg-Builds/releases/download/autobuild-2025-07-31-15-41/ffmpeg-N-120424-g03b9180fe3-win64-gpl.zip
██████████████████████████████ 147 MB / 147 MB
Successfully verified installer hash
Extracting archive...
Successfully extracted archive
Starting package install...
Path environment variable modified; restart your shell to use the new value.
Command line alias added: "ffmpeg"
Command line alias added: "ffplay"
Command line alias added: "ffprobe"
Successfully installed
Downloading https://github.com/yt-dlp/yt-dlp/releases/download/2025.08.11/yt-dlp.exe
██████████████████████████████ 17.5 MB / 17.5 MB
Successfully verified installer hash
Starting package install...
Command line alias added: "yt-dlp"
Path environment variable modified; restart your shell to use the new value.
Successfully installed
C:\CodeBlocks\winget-pkgs>refreshenv
Refreshing environment variables from registry for cmd.exe. Please wait...Finished..
C:\CodeBlocks\winget-pkgs>where yt-dlp
C:\Users\Admin\AppData\Local\Microsoft\WinGet\Links\yt-dlp.exe
C:\CodeBlocks\winget-pkgs>
Actual behavior
The PATH is not modified to include any of these folders
Environment
C:\Users\Admin>winget --info
Windows Package Manager v1.11.430
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.19045.6216
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.26.430.0
Winget Directories
-----------------------------------------------------------------------------------------------------------------------
Logs %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Diag…
User Settings %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\sett…
Portable Links Directory (User) %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User) %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root C:\Program Files\WinGet\Packages
Portable Package Root (x86) C:\Program Files (x86)\WinGet\Packages
Installer Downloads %USERPROFILE%\Downloads
Configuration Modules %LOCALAPPDATA%\Microsoft\WinGet\Configuration\Modules
Links
---------------------------------------------------------------------------
Privacy Statement https://aka.ms/winget-privacy
License Agreement https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale
Admin Setting State
--------------------------------------------------
LocalManifestFiles Enabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride Disabled
LocalArchiveMalwareScanOverride Disabled
ProxyCommandLineOptions Disabled
DefaultProxy Disabled
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 with the winget install portable-package path handling using the x64dbg manifest at manifests\x\x64dbg\x64dbg\2025.08.19, then compare it with the working yt-dlp installation. Reproduce the installation and verify whether the three expected package folders are added to PATH and whether where x64dbg, where x32dbg, and where x96dbg succeed after restarting the shell.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 46/100