winget-cli
winget-cli copied to clipboard
Allow multiple apps to be installed using a single command
Description of the new feature/enhancement
Let us call winget install with a list of apps, so it'll install them at the same time OR in sequence.
Proposal for command: winget install app-1 app-2 app-3
Or via config file like Chocolatey (e.g. packages.config)
I support it!
This is not the same thing as #156
I support this!
@denelon @brunovieira97
managing multiple apps in a single command should be supported for all commands , not install only but for list / upgrade / uninstall too.
@denelon @brunovieira97
managing multiple apps in a single command should be supported for all commands , not
installonly but forlist / upgrade / uninstalltoo.
I definitely agree with you! At least uninstall should be covered as well for feature parity between installation and removal process of an app. But implementing this for upgrade too would be very much welcome!
I upvote (support) for this issue!
This is extremely needed thing 🚀
This is one of the few things holding winget back from feeling like a full-fledged package manager (like apt, etc).
A simple way to implement would even be to accept multiple arguments and then just run them sequentially. Even a separate list argument would be fine to specify a list of apps by ID.
Would be cool if we could also install multiple apps by providing one file, like with Brewfile or Gemfile.
To work around this limitation, I added the following PowerShell function to my profile (notepad $profile):
# Function to process multiple WinGet Upgrades
function Winget-Upgrade {
Param(
# List of packages to upgrade
[Parameter(Position = 0, Mandatory = $true)]
[string[]] $Packages
)
foreach ($Package in $Packages) {
$Package = $Package.Trim()
Write-Host ('Upgrading {0}...' -f $Package) -ForegroundColor Green
WinGet Upgrade $Package
}
}
With this in place you can upgrade multiple packages like this:
Winget-Upgrade Package1.Package1,Package2.Package2
I also think that this should be supported. It would make usage a lot easier. I know that you can script it or generate a json file for future use. But it is not nearly as easy as apt-get, chcolatey, yum, etc.
With this in place you can upgrade multiple packages like this:
Winget-Upgrade Package1.Package1,Package2.Package2
Excellent.
For others: After adding this to your profile, don’t forget to reload the profile by doing . $profile
This was the first thing I wanted to do, when I just used it for the first time.
@danstis thx for the script.
I have not used power shell scripts util now, so I had to change the execution policy in order to conveniently use winget.
That should be available without any PS movement!
When and how ill we get the new release ?
When and how ill we get the new release ?
This feature will land in v1.5 which is Due by April 30, 2023
For more: https://github.com/microsoft/winget-cli/milestone/39
This feature will land in
v1.5which isDue by April 30, 2023For more: https://github.com/microsoft/winget-cli/milestone/39
And if i joined the Windows Package Manager Insider program?
And if I joined the Windows Package Manager Insider program?
I think this is it: https://devblogs.microsoft.com/commandline/windows-package-manager-preview/
I think this is it: https://devblogs.microsoft.com/commandline/windows-package-manager-preview/
Will it appears here ? https://github.com/microsoft/winget-cli/tags How fast ?
We're looking to cut another preview in the next week or two. It will show up in the releases as a "preview" and it will be published to Windows Insider Dev.
The below winget command do work for winget install-ing multiple packages at once via their ids.
As pointed above by @denelon @brunovieira97 and others, it would also be great to support multiple package ids for uninstall and maybe upgrade commands, for feature parity.
winget install package-id-1 package-id-2 --accept-package-agreements --accept-source-agreements
@jo-chemla uninstall and upgrade already support multiple IDs. It was all part of the same change as multiple IDs for install
Indeed, I was using the same arguments for install and uninstall --disable-interactivity --accept-package-agreements --accept-source-agreements although uninstall does not support --accept-package-agreements (which makes sense). Great to hear!