When I open Powershell, and type winget - this is the response:
winget : The term 'winget' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1
- winget
+ CategoryInfo : ObjectNotFound: (winget:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
Suggestion [3,General]: The command winget was not found, but does exist in the current location. Windows PowerShell does not load commands from the current location by default. If you trust this command, instead type: ".\winget". See "get-help about_Command_Precedence" for more details.
But if I go to the folder where winget is located (in my case %AppData%\Local\Microsoft\WindowsApps\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\winget.exe and type in winget with a "./" infront of it - it works fine! So my question is, how do I point a command like winget to execute the file located as mentioned above, but from any directory I'm in?
For instance, in linux I can use
"alias winget='%AppData%\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\winget.exe"
and it'll point the command to the location specified. Is there any way I can do this, but in Powershell/CMD?