Closed jo-chemla closed 1 week ago
I believe in this case, the issue is the limit of 10 arguments in a batch file.
Have you tried winget export
and winget import
?
They are a bit more optimized for dealing with a set of packages.
You could fairly easily modify the contents of the JSON file to suit your needs and save some typing.
It might also be worth taking a look at WinGet Configuration which can do considerably more than just install packages.
There is a hard limit to the number of args, but it is actually 128.
I just tried the command you shared and it seems to work correctly for me. It did install only 10 packages, but that was because Windows Terminal was already installed and it got skipped.
What version of winget are you using? Do you see any error in the logs? These can be found with winget --logs
Hey there, not exactly sure what happened, I tested again on another machine the winget install
command with >10 packages (~30, out of which 17 did install because the others were already satisfying the latest version). It might indeed have come from an earlier winget version - I don't have access to this machine anymore.
Thanks also for pointing out at WinGet Configuration
(looks a bit like ansible winget
although not live) and winget import/export
, this might indeed be very useful!
Description of the new feature / enhancement
Following support for
winget install/uninstall/upgrade
bulk mode install of multiple packages within a single command, it seems that there is a hard limit of 10 packages that can be processed at once - just tested it withinstall
on a fresh computer.It could be great to support an arbitrary count of packages in a single command.
Tested command, ffmpeg won't install as it's the 11th package of the command
Proposed technical implementation details
This might originate from the batch limitation of 10 args. Could the more than 10 packages be passed as a single arg, for example as a string variable
winget install "pkg1 ... pkg15"
? Or could some inspiration be taken from this StackOverflow post?