microsoft / microsoft/terminal
PATHEXT not working as expected
- Dominant language
- C++
- Stars
- 105k
- Forks
- 9.6k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 29
Description
### Windows Terminal version
1.20.11781.0
### Windows build number
10.0.22631.3880
### Other Software
_No response_
### Steps to reproduce
Using cmd.exe
Create a shortcut to "C:\Program Files\7-Zip\7z.exe" in C:\Shims\7z.exe.lnk
Add C:\Shims to PATH - set PATH=%PATH%;C:\Shims
Add .exe.lnk to PATHEXT - set PATHEXT=%PATHEXT%;.exe.lnk
execute "7z"
### Expected Behavior
7z should execute.
This works on Windows 10 but doesn't work on Windows 11.
Also "where 7z" works correctly on both Windows 10 and Windows 11.
### Actual Behavior
'7z' is not recognized as an internal or external command,
operable program or batch file.
Contributor guide
Research direction
Start by reproducing the PATHEXT and PATH setup in cmd.exe on the reported Windows 10 and Windows 11 builds, comparing `7z`, the `7z.exe.lnk` shortcut, and `where 7z`. Done means explaining or correcting why command execution differs so that `7z` runs through the `.exe.lnk` PATHEXT entry on Windows 11.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100