You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Issues when more than one package exist for winget install (ambigous names) #478
ambigous software packages won't install is -v is specified. Here PowerShell 7.x
Steps to reproduce
open Powershell 5.1/ 7.x or Terminal
winget install Powershell
Output: 2 possible products tagged as powershell the correct install name would be Microsoft.Powershell and ...Powershell-Preview
Specifying the full ID give same list
Specifying -v 7.0.2
still will not install PowerShell 7.0.2 via winget but throws 2 possible packages still
Expected behavior
issueing
winget install powershell -v 7.0.2 should install PowerShell
winget install Microsoft.Powershell -v 7.0.2 should install PowerShell
same with preview tags, ID and version
Actual behavior
just outputs 2 versions are available no selection, installation possible.
Environment
[winget --info]
Windows Package Manager version: v1.0.41331.0
Windows: 20161.1000 and earlier
Package: : 1.0.41331.0
I now understand that -v / --version is to fetch and display the version of the tool winget.
I'd rather would use this to specify a version for installation (or later uninstall)
PS C:\dev> winget install Microsoft.Powershell
Multiple apps found matching input criteria. Please refine the input.
Name Id Version
---------------------------------------------------------------
PowerShell-Preview Microsoft.PowerShell-Preview 7.1.0-preview.3
PowerShell Microsoft.PowerShell 7.0.2
Karl Wester-Ebbinghaus (@Karl-WE) You seem to be new to command line programs. winget supports a number of subcommands (install, show, search, etc.). If you pass the -? to one of those you'll see the additional options for those subcommands. You would've also seen that had you checked the online documentation.
To install a version other than latest you use:
# winget install --exact <id> --version <version number>
winget install Microsoft.dotnet --version 3.1.301 --exact
Found .NET Core [Microsoft.dotnet]
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://download.visualstudio.microsoft.com/download/pr/4e88f517-196e-4b17-a40c-2692c689661d/eed3f5fca28262f764d8b650585a7278/dotnet-sdk-3.1.301-win-x64.exe
██████████████████████████████ 124 MB / 124 MB
Successfully verified installer hash
Installing ...
Successfully installed!
winget --version will output the version of the tool
Given the logic that you can enter -? at any level reminds me much of Cisco IOS and speaking for Windows
fsutil
netsh
dism
but it is not overly very common in Windows to have the ability to specify /? any time with the previous level of commands. Some have it some have not.
Thanks for giving me the idea winget would favour this. Powershell does not offer a context sensitive help, quite unfortunately.
Before this dupe is entirely wasted time, please let us have a PR to make the winget ? more pointing out to this.
Still I see a inconsistency with the commandline options, we might discuss this in a new bug / feature request:
example
winget ? = help (fallback)
winget /? = help (fallback)
winget -? = help
winget --? = help
next level:
winget install ? or winget install /?
"no matching criteria"
winget install --? works
winget install -? works
Albeit help says: Wenn Sie weitere Details zu einem bestimmten Befehl erfahren möchten, übergeben Sie ihm das Hilfe-Argument. [-?]
I would rather see it here
Die folgenden Optionen stehen zur Verfügung:
-v,--version Version des Tools anzeigen
--info Allgemeine Informationen zum Tool anzeigen
-?, --? kontextsensitive Hilfe.
Wenn Sie weitere Details zu einem bestimmten Befehl erfahren möchten,
übergeben Sie ihm das Hilfe-Argument
Mind we are still on Windows, and -- commandlines are not common here. For a new tool like winget, which I see a bright future and major positive impact, we should not be dev-oriented but user oriented striving for consistency and clear and concise UX without reading docs, eventually with command lines everything should to work /? or ? see also, I refrain, microsoft/terminal#4632 (comment)
Otherwise winget is a Linux User friendly command line tool, but not so Windows user friendly.
IF we want to drop /? in favour for -? or --? or even ? I am absolutely ok with that
Then please leave a remark when winget /? is issued "please use -? or --? for help"
Karl Wester-Ebbinghaus (@Karl-WE) the issue as posted looks like a duplicate of #292 as Sebastian N. (@megamorf) commented. I think the issue as you've elaborated now looks more like a new request to either make aliases for other forms of "?" or to provide hints when one is used. I don't believe we have an Issue for that feature.
Activity
Karl-WE commentedon Jul 4, 2020
I now understand that -v / --version is to fetch and display the version of the tool winget.
I'd rather would use this to specify a version for installation (or later uninstall)
tommck commentedon Jul 6, 2020
What exactly is one supposed to do here?
I see no way to pare this down to anymore
Karl-WE commentedon Jul 6, 2020
Tom McKearney (@tommck) are you asking me?
tommck commentedon Jul 6, 2020
No, was mostly ranting in support of you :)
Turns out you have to use
-e, like:Karl-WE commentedon Jul 6, 2020
-e is not even documented
https://docs.microsoft.com/en-us/windows/package-manager/winget/
Karl-WE commentedon Jul 6, 2020
as said -v is more logical to pick a version and -v is a duplicate of --info.
for --info there is no -i command
Team, you're going the same path as for Terminal lads remote related design question / issue
microsoft/terminal#4632 (comment)
megamorf commentedon Jul 6, 2020
Karl Wester-Ebbinghaus (@Karl-WE) You seem to be new to command line programs.
wingetsupports a number of subcommands (install,show,search, etc.). If you pass the-?to one of those you'll see the additional options for those subcommands. You would've also seen that had you checked the online documentation.To install a version other than latest you use:
megamorf commentedon Jul 6, 2020
Demitrius Nelon (@denelon) This is a duplicate of #292
Karl-WE commentedon Jul 6, 2020
Sebastian N. (@megamorf) I am not new to this megamorf.
winget --version will output the version of the tool

Given the logic that you can enter -? at any level reminds me much of Cisco IOS and speaking for Windows
but it is not overly very common in Windows to have the ability to specify /? any time with the previous level of commands. Some have it some have not.
Thanks for giving me the idea winget would favour this. Powershell does not offer a context sensitive help, quite unfortunately.
Before this dupe is entirely wasted time, please let us have a PR to make the winget ? more pointing out to this.
Still I see a inconsistency with the commandline options, we might discuss this in a new bug / feature request:
example
winget ? = help (fallback)
winget /? = help (fallback)
winget -? = help
winget --? = help
next level:
winget install ? or winget install /?
"no matching criteria"
winget install --? works
winget install -? works
Albeit help says:
Wenn Sie weitere Details zu einem bestimmten Befehl erfahren möchten, übergeben Sie ihm das Hilfe-Argument. [-?]I would rather see it here
Die folgenden Optionen stehen zur Verfügung:
-v,--version Version des Tools anzeigen
--info Allgemeine Informationen zum Tool anzeigen
-?, --? kontextsensitive Hilfe.
Wenn Sie weitere Details zu einem bestimmten Befehl erfahren möchten,
übergeben Sie ihm das Hilfe-Argument
Mind we are still on Windows, and -- commandlines are not common here. For a new tool like winget, which I see a bright future and major positive impact, we should not be dev-oriented but user oriented striving for consistency and clear and concise UX without reading docs, eventually with command lines everything should to work /? or ? see also, I refrain, microsoft/terminal#4632 (comment)
Otherwise winget is a Linux User friendly command line tool, but not so Windows user friendly.
IF we want to drop /? in favour for -? or --? or even ? I am absolutely ok with that
Then please leave a remark when winget /? is issued "please use -? or --? for help"
denelon commentedon Jul 7, 2020
Karl Wester-Ebbinghaus (@Karl-WE) the issue as posted looks like a duplicate of #292 as Sebastian N. (@megamorf) commented. I think the issue as you've elaborated now looks more like a new request to either make aliases for other forms of "?" or to provide hints when one is used. I don't believe we have an Issue for that feature.
denelon commentedon Jul 7, 2020
Duplicate of #292