Multiple apps found matching input criteria when trying to install PowerShell 7.0.1
Brief description of your issue
When I try to install PowerShell 7.0.1, winget cannot seem to locate the correct one
Steps to reproduce
None of these work winget install PowerShell winget install Powershell winget install Microsoft.Powershell winget install --id Microsoft.Powershell --version 7.0.1
Expected behavior
It should pick up Powershell 7.0.1 (btw, that should have been named PowerShell not Powershell)
Actual behavior
I get the following:
Multiple apps found matching input criteria. Please refine the input.
Name Id Version
---------------------------------------------------------------
Powershell Microsoft.Powershell 7.0.1
PowerShell-Preview Microsoft.PowerShell-Preview 7.1.0-preview.3
Environment
PS C:\Users\adil> winget --info
Windows Package Manager v0.1.41331 Preview
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.18363.836
Package: Microsoft.DesktopAppInstaller v1.0.41331.0
Links:
Privacy Statement: https://aka.ms/winget-privacy
License agreement: https://aka.ms/winget-license
3rd Party Notices: https://aka.ms/winget-3rdPartyNotice
Homepage: https://aka.ms/winget
I have the same issue trying to Install FireFox.
It seems that if there is an exact match, then that should be installed.
I was able to install or upgrade PowerShell using the exact match parameter
winget install -e Microsoft.Powershell
A better solution to installing PowerShell7 is to use the install-powershell command in power shell's github repo. It gives you much more flexibility. It can also be remoted over PS Remoting, which winget appears to not handle.
A better solution to installing PowerShell7 is to use the install-powershell command in power shell's github repo. It gives you much more flexibility. It can also be remoted over PS Remoting, which winget appears to not handle.
Good point but I believed winget was designed in similar functionality to apt utility, meaning you have to be on the server/machine in some form to use it. I guess you can use PS and winget together to extend that functionality...my 2c
I ran into the same problem today. I would expect it to be interactive like:
"Multiple packages matched your query. Please select one of the following: [1] Microsoft.Powershell [2] Microsoft.PowerShell-Preview"
Anyway thanks for the awesome work 💪
This worked fine about 2 days ago, but the 7.1.0 preview version was not available at that time. Unfortunately, I am not having any success using the '-e' switch either. :(
Ran into this same issue as well.
winget install -e Microsoft.Powershell did work for me but these circumstances should probably be handled a bit cleaner with perhaps a selection list or some other method.
Thanks for the great work on this!
I ran into the same problem today. I would expect it to be interactive like:
"Multiple packages matched your query. Please select one of the following: [1] Microsoft.Powershell [2] Microsoft.PowerShell-Preview"
Anyway thanks for the awesome work
The problem is, preview version should not even come up when the version is specified. Names are similar but versions are different. It's as if version is totally ignored.
winget install -e Microsoft.PowerShell doesn't work.
winget install -e Microsoft.Powershell does work.
The search is case sensitive! (https://github.com/microsoft/winget-pkgs/pull/884)
How would I discover -e. And what does '-e' mean? A bad UI.
@doctordns winget install --info
--info doesn't exist on install but it will return the options.
First thing i tried was winget install hoping that it would return the help of the install module.
winget team -> Loving this cli so far by the way! 👍
I had a similar problem trying to install Discord
PS C:\Users\orta> winget
Windows Package Manager v0.1.41331 Preview
Copyright (c) Microsoft Corporation. All rights reserved.
WinGet command line utility enables installing applications from the command line.
usage: winget [<command>] [<options>]
The following commands are available:
install Installs the given application
show Shows info about an application
search Find and show basic info of apps
hash Helper to hash installer files
validate Validates a manifest file
For more details on a specific command, pass it the help argument. [-?]
The following options are available:
-v,--version Display the version of the tool
--info Display general info of the tool
More help can be found at: https://aka.ms/winget-command-help
PS C:\Users\orta> winget install discord
Multiple apps found matching input criteria. Please refine the input.
Name Id Version
--------------------------------------------
Discord Discord.Discord 0.0.306
Discord Canary Discord.DiscordCanary 0.0.264
PS C:\Users\orta> winget install discord.discord
Multiple apps found matching input criteria. Please refine the input.
Name Id Version
--------------------------------------------
Discord Discord.Discord 0.0.306
Discord Canary Discord.DiscordCanary 0.0.264
PS C:\Users\orta> winget install Discord.Discord
Multiple apps found matching input criteria. Please refine the input.
--------------------------------------------
Discord Discord.Discord 0.0.306
Discord Canary Discord.DiscordCanary 0.0.264
PS C:\Users\orta> winget install --help
Windows Package Manager v0.1.41331 Preview
Copyright (c) Microsoft Corporation. All rights reserved.
Installs the given application
usage: winget install [[-q] <query>] [<options>]
The following arguments are available:
-q,--query The query used to search for an app
The following options are available:
-m,--manifest The path to the manifest of the application
--id Filter results by id
--name Filter results by name
--moniker Filter results by app moniker
-v,--version Use the specified version; default is the latest version
-s,--source Find app using the specified source
-e,--exact Find app using exact match
-i,--interactive Request interactive installation; user input may be needed
-h,--silent Request silent installation
-o,--log Log location (if supported)
--override Override arguments to be passed on to the installer
-l,--location Location to install to (if supported)
More help can be found at: https://aka.ms/winget-command-install
PS C:\Users\orta> winget install --id Discord.Discord
Multiple apps found matching input criteria. Please refine the input.
Name Id Version
--------------------------------------------
Discord Discord.Discord 0.0.306
Discord Canary Discord.DiscordCanary 0.0.264
( and I kinda left it at that and installed it manually )
@orta it would probably work if you used
winget install --exact Discord.Discord or winget install -e Discord.Discord
problem is that:
- -e option is not obvious
- It's Case sensitive, and that's not obvious either both of these are documentation problems. If winget team took a clue from PowerShell team and actually created a help that's useful, with examples, people could have discovered how to do these.
There are other problems though, mainly disregard for version. I cannot think of any good reason why this should not work:
winget install --id Discord.Discord --version 0.0.306
that's nuts!
My takeaway here is the semantic text being used here. Right now winget install behaves exactly like winget show at times where it can't find an exact output.
install is a command, the verb is specific in nature and implicitly suggests that it expects an exact match. The install command should fail when a exact match cannot be picked out (with appropriate messaging).
How does Winget KNOW that I do not want both versions loaded? I have two versions of Snagit, Multiple versions of.NET, etc. And if 'install' is a verb, then 'show' should be 'get'. From my phone so apologies for the typos. !
BTW
winget install -e Microsoft.Powershell
will install 7.0.0
to install the latest run
winget install --id Microsoft.PowerShell -e
This worked for me, but others have reported that it didn't work (I see a PR has been made to make this work):
winget install -e Microsoft.PowerShell
This worked for me, but others have reported that it didn't work (I see a PR has been made to make this work):
winget install -e Microsoft.PowerShell
I had that issue and winget install Microsoft.PowerShell -e worked like a charm
same issue with me but installing git through winget
I ran into this issue specifically with terminal; I saw on one of the blogs about winget suggesting i could simply "winget install terminal" and I was very excited to try this 😅
I think one solution (to these specific packages) is to exclude preview/prerelease packages unless a flag is provided. Notify that prereleases are available if you insist, but unless a user is explicitly trying to install a prerelease, listing it in the default query may not be helpful.
Although hiding the preview is a solution for now, if someone comes along with SuperTerminal or TerminalX, users will have the exact same issue again, needing to qualify "Microsoft.WindowsTerminal" (it's a lot to type, relative to other package managers, terminal is a lot more concise and memorable!). I imagine some kind of name aliasing for packages or prompting the user to ask about a best match (unless it's run non-interactively) would be better long term solutions.