2

After installing Ubuntu 20.04 using WSL, I cannot run .exe files from CMD without providing the suffix .exe.

1

It turns out that PATHEXT in CMD does not include the PATHEXT set from the System environment variables any more:

enter image description here

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):

enter image description here

If I now close CMD and reopen:

> echo %PATHEXT%
.ext;.bat;.PL

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.