PowerToys icon indicating copy to clipboard operation
PowerToys copied to clipboard

Command Not Found

Open CesarSant2000 opened this issue 1 year ago • 6 comments

Microsoft PowerToys version

0.77.0

Installation method

GitHub

Running as admin

Yes

Area(s) with issue?

General

Steps to reproduce

Go to the new Command not found module It will show that you don't have powershell 7.4 or above because it's only searching for the included version and not the one on program and files

✔️ Expected Behavior

Work fine

❌ Actual Behavior

Not working

Other Software

No response

CesarSant2000 avatar Jan 11 '24 14:01 CesarSant2000

Same issue here: image

glenncarr avatar Jan 11 '24 15:01 glenncarr

@glenncarr @CesarSant2000 , PowerToys tries to use the pwsh.exe it finds on PATH. For example if you try to run (Win+R) "pwsh.exe" which version do you get?

/needinfo

jaimecbernardo avatar Jan 11 '24 16:01 jaimecbernardo

@jaimecbernardo image

EDIT: Starting from Run, it brings up the 64-bit version (7.4.0)

glenncarr avatar Jan 11 '24 16:01 glenncarr

@jaimecbernardo I uninstalled the x86 version and all is well. Thank you!

glenncarr avatar Jan 11 '24 16:01 glenncarr

@jaimecbernardo I uninstalled the x86 version and all is well. Thank you!

Thanks for the feedback! Although I'm not quite sure why it would pick up the x86 version 😆 We're using ProcessStartInfo from C#. Perhaps the x86 appears first in the path resolution logic.

jaimecbernardo avatar Jan 11 '24 16:01 jaimecbernardo

That was exactly my problem, in the path the x86 version was first and it was taking it. I just move the order in the path and it's working just fine.

CesarSant2000 avatar Jan 11 '24 17:01 CesarSant2000

Glad you found the fix, @CesarSant2000 and @glenncarr. I'll be marking this resolved and renaming the issue to help others find it in the future. If you run into any problems, feel free to open a new issue. Thanks! :)

nguyen-dows avatar Jan 26 '24 18:01 nguyen-dows