winget-cli: winget not working with command prompt (works with Powershell)
Brief description of your issue
I have been using winget on my desktop for a while, had done a semi-recent windows clean install and everything worked great for many months, until may or june when my winget randomly started showing this on command prompt
“‘winget’ is not recognized as an internal or external command, operable program or batch file.”
when I use Powershell it works instantly
Steps to reproduce
No idea, I hardly ever install new programs and I came in one day and cmd refused to access winget so there was nothing new added to my computer at or near the same time that would have caused this, and it has persisted through in-place upgrades and installs as well as cumulative updates recently.
Expected behavior
the list of winget options (which appears in powershell with no issue)
Actual behavior
CMD -> type WINGET -> shows “unrecognized”
ADMIN CMD -> type WINGET -> still shows “unrecognized”
Environment
Latest version of Winget from Github, I have uninstalled and used the one from Microsoft store, it makes no difference.
Powershell works regardless both times.
I have tried clean installs and repair installs, etc... it's driving me crazy
I have seen the troubleshooting guides but I've tried it all, even the environment variables path i set correctly and it still wouldn't work in cmd
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 25 (8 by maintainers)
Thank you everyone for your help! ❤️
I’ll try reinstalling putty at some point when i feel brave enough and see if it causes the same issue, lol.
Quick question - should those PATH variables for products i have uninstalled be removed normally during the uninstall process? or is this normal for residuals like this even when using tools like Revo Uninstaller
i shut my computer down and ran an Ubuntu usb on my other computer with everything for winget working to another usb, i was able to replace the winget.exe with the one i copied and now at least when i type “winget” it says there is something wrong and need to reinstall but Microsoft store says it’s up to date. will try the version on github at some point