Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple apps found matching input criteria when trying to install PowerShell 7.0.1 #282

Closed
AdilHindistan opened this issue May 22, 2020 · 66 comments
Labels
Issue-Feature This is a feature request for the Windows Package Manager client.

Comments

@AdilHindistan
Copy link

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


@ghost ghost added the Needs-Triage Issue need to be triaged label May 22, 2020
@CPUTek1
Copy link

CPUTek1 commented May 22, 2020

I have the same issue trying to Install FireFox.

@SteveL-MSFT
Copy link
Member

It seems that if there is an exact match, then that should be installed.

@kramfs
Copy link

kramfs commented May 22, 2020

I was able to install or upgrade PowerShell using the exact match parameter
winget install -e Microsoft.Powershell

@doctordns
Copy link

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.

@kramfs
Copy link

kramfs commented May 22, 2020

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

@marvinpuethe
Copy link

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 💪

@Elohirr
Copy link

Elohirr commented May 22, 2020

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. :(

@sahammer
Copy link
Member

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!

@AdilHindistan
Copy link
Author

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.

@chelnak
Copy link

chelnak commented May 23, 2020

winget install -e Microsoft.PowerShell doesn't work.

winget install -e Microsoft.Powershell does work.

The search is case sensitive! (microsoft/winget-pkgs#884)

@doctordns
Copy link

How would I discover -e. And what does '-e' mean?
A bad UI.

@chelnak
Copy link

chelnak commented May 23, 2020

@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! 👍

@orta
Copy link

orta commented May 24, 2020

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 )

@AdilHindistan
Copy link
Author

@orta it would probably work if you used
winget install --exact Discord.Discord or winget install -e Discord.Discord

problem is that:

  1. -e option is not obvious
  2. 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!

@JulianChow94
Copy link

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

@doctordns
Copy link

doctordns commented May 26, 2020 via email

@TravisEz13
Copy link
Member

TravisEz13 commented May 26, 2020

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

@denelon denelon added Issue-Feature This is a feature request for the Windows Package Manager client. and removed Needs-Triage Issue need to be triaged labels May 28, 2020
@denelon denelon added this to the Package Manager Backlog milestone May 28, 2020
@abshirahmed
Copy link

abshirahmed commented May 30, 2020

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

@denelon
Copy link
Contributor

denelon commented Jun 3, 2021

@pressRtowin can you share output like I did from the same two commands? I'd like to see what might be different.

@pressRtowin
Copy link

I have no issues installing powershell...

@denelon
Copy link
Contributor

denelon commented Jun 3, 2021

@pressRtowin it looks like two instances of Plexamp were installed on your system. That's the same as the "Cura" example I have above. I don't know if the Plexamp installer actually recognizes the earlier version and upgrades it or if it is designed to support "side by side" installation. Some packages are designed with this intentional behaviors. For packages that aren't, you might need to have the manifest modified for the "UpgradeBehavior" to specify uninstall to remove the "older" version before installing the "newer" version.

@pressRtowin
Copy link

@denelon Doesn't really explain why winget is giving a "Please refine the input." error and not some type of installation error, especially when I'm specifying an exact match using the ID fields which are clearly different in the two matches that it finds. The duplicate IDs in winget list plexamp would've only been a thing after I ran the install command but I was having the same error before that.

@denelon
Copy link
Contributor

denelon commented Jun 3, 2021

Generally, the "Please refine the input" error happens when the client needs the user to disambiguate between multiple options. This happens several places in the code. If the -id is not distinctly identifying the package manifest or a "single" entry in "Add / Remove Programs" this happens. I believe what is happening is either the two entries in "Add / Remove Programs" aren't unique enough (I think there is work here in the client), or for some reason more than one manifest matched some set of criteria. This may be similar to microsoft/winget-pkgs#16038

@denelon
Copy link
Contributor

denelon commented Jun 4, 2021

@pressRtowin can you re-create the conditions in a virtual machine and share the logs? You may very well have encountered a bug, or something changed with the manifests, and the problem was corrected. I would be more than happy to take a look at how we could fix the problem if this is a reproduceable bug.

@SiJiL82
Copy link

SiJiL82 commented Jun 14, 2021

Getting a similar situation trying to upgrade the .NET 5.0 SDK. Because I also have the 6.0 preview, it picks that up too, and returns "refine the input" even if I specify the ID of the 5.0 package:

`C:> winget upgrade --id Microsoft.dotnet
Multiple installed packages found matching input criteria. Please refine the input.
Name Id

Microsoft .NET SDK Microsoft.dotnet
Microsoft .NET SDK 6.0.100-preview.4.21255.9 (x64) {e0100246-937c-4ed6-b71f-2e37cf75fe43}`

@nascentt
Copy link

This issue still exists:

PS C:\WINDOWS\system32> winget upgrade
Name Id Version Available Source

TeamViewer TeamViewer.TeamViewer 15.21.5 15.21.6 winget
TeraCopy CodeSector.TeraCopy 3.8.2 3.8.5 winget
Plexamp plex.Plexamp 3.4.0 3.5.0 winget
Python 3 Python.Python.3 3.9.5150.0 3.9.6150.0 winget

PS C:\WINDOWS\system32> winget upgrade codesector.teracopy
Multiple installed packages found matching input criteria. Please refine the input.
Name Id

TeraCopy CodeSector.TeraCopy
TeraCopy version 3.8.2 TeraCopy_is1

PS C:\WINDOWS\system32> winget upgrade python.python.3
Multiple installed packages found matching input criteria. Please refine the input.
Name Id

Python 3 Python.Python.3
Python 3.9.5 (32-bit) {708847ae-c2de-49fb-9b85-8d2e9c991358}

PS C:\WINDOWS\system32> winget upgrade plex.plexamp
Multiple installed packages found matching input criteria. Please refine the input.
Name Id

Plexamp plex.Plexamp
Plexamp 3.4.0 {46418f0f-cea3-5740-a7e9-a0166db1e7c4}

@SiJiL82
Copy link

SiJiL82 commented Sep 7, 2021

Any news on this - it's rendering winget basically unusable for alot of packages, in part because "exact" doesn't seem to mean exact at all. For example:

winget upgrade -e "Microsoft Visual C++ 2013 Redistributable (x86)"
Multiple installed packages found matching input criteria. Please refine the input.
Name Id

Microsoft Visual C++ 2013 Redistributable (x86) Microsoft.VC++2013Redist-x86
Microsoft Visual C++ 2013 Redistributable (x64) - 12.0.40664 {042d26ef-3dbe-4c25-95d3-4c1b11b235a7}

I've include "x86" in my name parameter, so why is it "exactly" matching the x64 version?

@denelon
Copy link
Contributor

denelon commented Sep 7, 2021

Matching is looking at the values in the manifest and the values in Apps & Features. The runtimes are a bit of a challenge based on how versioning was implemented. We're still working on finding the best solution.

@robross0606
Copy link

robross0606 commented Sep 11, 2021

This is still not working for upgrade command:

C:\Users\me>winget upgrade -e Python.Python.3
Multiple installed packages found matching input criteria. Please refine the input.
Name                   Id
-------------------------------------------------------------
Python 3               Python.Python.3
Python 2.7.18 (64-bit) {A5F504DF-2ED9-4A2D-A2F3-9D2750DD42D6}

C:\Users\me>winget show -e Python.Python.3
Found Python 3 [Python.Python.3]
Version: 3.9.7150.0
Publisher: Python Software Foundation
Author: Python Software Foundation
Moniker: python3
Description: Python is a programming language that lets you work more quickly and integrate your systems more effectively.
Homepage: https://www.python.org
License: PSF LICENSE AGREEMENT FOR PYTHON
License Url: https://docs.python.org/3/license.html
Installer:
  Type: Burn
  Locale: en-US
  Download Url: https://www.python.org/ftp/python/3.9.7/python-3.9.7-amd64.exe
  SHA256: 3f63f4c77a6da13f9bae715eb6644a48bd5f900601e0f1f233862e8ca1a96dd8

C:\Users\me>winget upgrade --id Python.Python.3 -e
Multiple installed packages found matching input criteria. Please refine the input.
Name                   Id
-------------------------------------------------------------
Python 3               Python.Python.3
Python 2.7.18 (64-bit) {A5F504DF-2ED9-4A2D-A2F3-9D2750DD42D6}

Why on Earth is it even matching "Python 2" with "Python 3"?!

@VincentVerweij
Copy link

Stumbled upon this issue when trying to perform winget upgrade Microsoft.Teams.
It is giving me the following output:

Multiple installed packages found matching input criteria. Please refine the input.
Name            Id
-------------------------------
Microsoft Teams Microsoft.Teams
Microsoft Teams Teams

I did see in this discussion issue that people are mentioning to use the -e flag (or --exact), but when doing so I still get the same output as mentioned above.

I also looked at the casing as this seems to be case sensitive, but no luck there either.

@Elias-Graf
Copy link

Elias-Graf commented Sep 23, 2021

C:\Users\Elias> winget uninstall Toinane.Colorpicker
Multiple installed packages found matching input criteria. Please refine the input.
Name              Id
--------------------------------------------------------
Colorpicker       Toinane.Colorpicker
Colorpicker 2.0.3 {2fa01720-ea93-5692-9697-66fad2caf3bf}
C:\Users\Elias> winget uninstall -e --id Toinane.Colorpicker
Multiple installed packages found matching input criteria. Please refine the input.
Name              Id
--------------------------------------------------------
Colorpicker       Toinane.Colorpicker
Colorpicker 2.0.3 {2fa01720-ea93-5692-9697-66fad2caf3bf}

Can we re-open this issue? :)

@wizzor
Copy link

wizzor commented Oct 21, 2021

I too want this issue reopened, I have installed a number of packages, some of which refuse to install without the -e flag.

Better behavior should be to try with exact match first and should that fail offer the interactive prompt @marvinpuethe proposed.

@denelon
Copy link
Contributor

denelon commented Oct 21, 2021

This issue was related to PowerShell and the "install" command.

There are various reasons why the winget client is having trouble with disambiguation. I've created a couple of new issues for specific impacted scenarios so we can isolate and resolve them. In some cases, the problem needs to be fixed in the manifest, or the package installer itself rather than the winget client.

We need specific actionable issues so we can isolate the cause(s), and resolve them. Some of the Issues are too broad and generic to be confident they have been resolved. Sadly when those are encountered, we end up with multiple reports of something that isn't quite the same. In those cases, I have been trying to create discrete Issues to identify the specific scenario impacted.

There are a few exceptions, and in those cases, I close the original as a duplicate, and refer to another issue we're working on. Sometimes one fix impacts multiple different scenarios.

I blogged about some tips with using multiple sources.

@Adilius
Copy link

Adilius commented Oct 24, 2021

I was able to install or upgrade PowerShell using the exact match parameter winget install -e Microsoft.Powershell

What worked for me was using capital 's' in 'shell', so using this line instead: winget install -e Microsoft.PowerShell

@maartenheebink
Copy link

Stumbled upon this issue when trying to perform winget upgrade Microsoft.Teams. It is giving me the following output:

Multiple installed packages found matching input criteria. Please refine the input.
Name            Id
-------------------------------
Microsoft Teams Microsoft.Teams
Microsoft Teams Teams

I did see in this discussion issue that people are mentioning to use the -e flag (or --exact), but when doing so I still get the same output as mentioned above.

I also looked at the casing as this seems to be case sensitive, but no luck there either.

I fixed this by replacing upgrade with install, winget install Microsoft.Teams -e upgraded the package either way

@ryanwkirby
Copy link

Stumbled upon this issue when trying to perform winget upgrade Microsoft.Teams. It is giving me the following output:

Multiple installed packages found matching input criteria. Please refine the input.
Name            Id
-------------------------------
Microsoft Teams Microsoft.Teams
Microsoft Teams Teams

Can confirm.

Microsoft Teams is currently impossible to upgrade using the upgrade command, regardless of whether or not you use the -e flag, correct capitalization, --id params, etc.

Replacing upgrade with install does work, though.

@glhrmv
Copy link

glhrmv commented Oct 28, 2021

The -e flag seems to work but I had to reach this page via a Google search to figure that out.

I was trying to winget install vlc and no matter how specific I was with my query (e.g. winget install VideoLAN.VLC) it kept telling me I should be more specific.

@flevi29
Copy link

flevi29 commented Dec 10, 2021

PS C:\> winget upgrade -e --id 'Microsoft.VC++2015-2022Redist-x86'
Multiple installed packages found matching input criteria. Please refine the input.
Name                                                               Id
---------------------------------------------------------------------------------------------------------
Microsoft Visual C++ 2015-2022 Redistributable (x86)               Microsoft.VC++2015-2022Redist-x86
Microsoft Visual C++ 2015-2019 Redistributable (x64) - 14.29.30135 {fa7f6d52-f85e-48ef-8f56-a37268aa5772}
PS C:\>

Regardless whether it's even worth updating this package, how does one get more specific than this?

@denelon
Copy link
Contributor

denelon commented Dec 10, 2021

@FLevent29 this is a bug. We're working on additional schema changes to better match what we see in Apps & Features. This is one of our prime test cases for ensuring the matching logic is improved. The schema has been updated, now we need to do the work in the client to leverage the fields. Please add your 👍 to #980.

@ageekhere
Copy link

ageekhere commented Jan 21, 2022

I will also leave this here in the hope that it will get fixed

Microsoft Visual C++ 2008 Redistributable - x64 Microsoft.VC++2008Redist-x64 9.0.30729.4148 9.0.30729.6161 winget
2 upgrades available.

winget upgrade Microsoft.VC++2008Redist-x86

Multiple installed packages found matching input criteria. Please refine the input.
Name                                                           Id
-----------------------------------------------------------------------------------------------------
Microsoft Visual C++ 2008 Redistributable - x86                Microsoft.VC++2008Redist-x86
Microsoft Visual C++ 2008 Redistributable - x86 9.0.30729.6161 {9BE518E6-ECC6-35A9-88E4-87755C07200F}
Microsoft Visual C++ 2008 Redistributable - x64 9.0.30729.4148 {4B6C7001-C7D6-3710-913E-5BC23FCE91E6}
Microsoft Visual C++ 2008 Redistributable - x64 9.0.30729.6161 {5FCE6D76-F5DC-37AB-B2B8-22AB8CEDB1D4}
Microsoft Visual C++ 2008 Redistributable - x86 9.0.30729.17   {9A25302D-30C0-39D9-BD6F-21E6EC160475} 

@spicycoder
Copy link

Facing same with Python 2 & .NET SDK

👽  winget upgrade -e Python.Python.2
Multiple installed packages found matching input criteria. Please refine the input.
Name                   Id
-------------------------------------------------------------
Python 2               Python.Python.2
Python 2.7.18 (64-bit) {A5F504DF-2ED9-4A2D-A2F3-9D2750DD42D6}
👽  winget upgrade -e Microsoft.dotnet
Multiple installed packages found matching input criteria. Please refine the input.
Name                             Id
-----------------------------------------------------------------------
Microsoft .NET SDK               Microsoft.dotnet
Microsoft .NET SDK 5.0.405 (x64) {343a89ec-9510-4063-9421-b0767cc25d40}

amazing tool btw, thanks

@LogicBypass
Copy link

People just follow the recommendation! Example:

 winget install --name PowerShell --exact --source winget
Multiple packages found matching input criteria. **Please refine the input.**
Name               Id                           Source
------------------------------------------------------
PowerShell Preview Microsoft.PowerShell.Preview winget
PowerShell         Microsoft.PowerShell         winget 

REFINE THE INPUT! Use Id, version, or anything that distinguishes the package.
Example:
winget install --name PowerShell --exact --Id Microsoft.PowerShell --source winget

@SuperBartimus
Copy link

SuperBartimus commented Oct 11, 2023

I'm seeing this as well:

 winget upgrade --include-unknown
Name                                                   Id                            Version        Available     Source
------------------------------------------------------------------------------------------------------------------------
Google Chrome                                          Google.Chrome                 117.0.5938.150 118.0.5993.71 winget
Windows Terminal                                       Microsoft.WindowsTerminal     1.18.2681.0    1.18.2822.0   winget
OBS Studio                                             OBSProject.OBSStudio          29.0.2         29.1.3        winget
Google Chrome                                          Google.Chrome                 117.0.5938.150 118.0.5993.71 winget
Microsoft ASP.NET Core 3.1.32 - Shared Framework (x64) Microsoft.DotNet.AspNetCore.6 < 6.0.5        6.0.23        winget
5 upgrades available. 

I then perform:

Winget upgrade --disable-interactivity --force --id google.chrome
Found Google Chrome [Google.Chrome] Version 118.0.5993.71
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://dl.google.com/dl/chrome/install/googlechromestandaloneenterprise64.msi
  ██████████████████████████████   103 MB /  103 MB
Successfully verified installer hash
Starting package install...
Successfully installed

and then going back to:

winget upgrade --include-unknown
Name                                                   Id                            Version        Available     Source
------------------------------------------------------------------------------------------------------------------------
Google Chrome                                          Google.Chrome                 117.0.5938.150 118.0.5993.71 winget
Windows Terminal                                       Microsoft.WindowsTerminal     1.18.2681.0    1.18.2822.0   winget
OBS Studio                                             OBSProject.OBSStudio          29.0.2         29.1.3        winget
Microsoft ASP.NET Core 3.1.32 - Shared Framework (x64) Microsoft.DotNet.AspNetCore.6 < 6.0.5        6.0.23        winget
4 upgrades available.

You can see it upgraded one of them. If I do the the upgrade command again, I get this:

Winget upgrade --disable-interactivity --force --id Google.Chrome
No available upgrade found.
No newer package versions are available from the configured sources.

And if I issue this command, this is the result:

Winget upgrade --disable-interactivity --force --name "Google Chrome"
Multiple installed packages found matching input criteria. Please refine the input.
Name          Id
---------------------------
Google Chrome Google.Chrome
Google Chrome Google.Chrome

... you can see the IDs are identical.

Using the --exact flag doesn't help.
I'm also experiencing this issue with Microsoft.DotNet.AspNetCore.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Feature This is a feature request for the Windows Package Manager client.
Projects
None yet
Development

No branches or pull requests