After installing Ubuntu 20.04 using WSL, I cannot run .exe
files from CMD without providing the suffix .exe
.
1 Answer
It turns out that PATHEXT
in CMD does not include the PATHEXT
set from the System environment variables any more:
If I type from CMD:
> echo %PATHEXT%
.PL
Notice that the settings from the system variables are not included. You can fix this by adding .exe
to PATHEXT for the User variables (not system variables):
If I now close CMD and reopen:
> echo %PATHEXT%
.ext;.bat;.PL