winget-cli icon indicating copy to clipboard operation
winget-cli copied to clipboard

Allow multiple apps to be installed using a single command

Open brunovieira97 opened this issue 5 years ago • 14 comments

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

brunovieira97 avatar May 19 '20 21:05 brunovieira97

Or via config file like Chocolatey (e.g. packages.config)

shawnwildermuth avatar May 20 '20 06:05 shawnwildermuth

I support it!

masx200 avatar May 24 '20 12:05 masx200

This is not the same thing as #156

denelon avatar Aug 19 '20 00:08 denelon

I support this!

ghost avatar Apr 18 '21 13:04 ghost

@denelon @brunovieira97

managing multiple apps in a single command should be supported for all commands , not install only but for list / upgrade / uninstall too.

ghost avatar May 03 '21 22:05 ghost

@denelon @brunovieira97

managing multiple apps in a single command should be supported for all commands , not install only but for list / upgrade / uninstall too.

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!

brunovieira97 avatar May 03 '21 23:05 brunovieira97

I upvote (support) for this issue!

This is extremely needed thing 🚀

sanamhub avatar Oct 06 '21 05:10 sanamhub

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.

BehymerTech avatar Oct 21 '21 14:10 BehymerTech

Would be cool if we could also install multiple apps by providing one file, like with Brewfile or Gemfile.

fredrikaverpil avatar Oct 23 '21 15:10 fredrikaverpil

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

danstis avatar Nov 24 '21 03:11 danstis

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.

alie2n avatar Oct 10 '22 08:10 alie2n

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

asifm avatar Oct 17 '22 03:10 asifm

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.

tnixeu avatar Oct 18 '22 07:10 tnixeu

That should be available without any PS movement!

emoxam avatar Jan 01 '23 12:01 emoxam

When and how ill we get the new release ?

emoxam avatar Feb 07 '23 08:02 emoxam

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

sanamhub avatar Feb 07 '23 10:02 sanamhub

This feature will land in v1.5 which is Due by April 30, 2023 For more: https://github.com/microsoft/winget-cli/milestone/39

And if i joined the Windows Package Manager Insider program?

emoxam avatar Feb 07 '23 10:02 emoxam

And if I joined the Windows Package Manager Insider program?

I think this is it: https://devblogs.microsoft.com/commandline/windows-package-manager-preview/

sanamhub avatar Feb 07 '23 10:02 sanamhub

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 ?

emoxam avatar Feb 07 '23 10:02 emoxam

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.

denelon avatar Feb 07 '23 17:02 denelon

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 avatar Sep 07 '23 16:09 jo-chemla

@jo-chemla uninstall and upgrade already support multiple IDs. It was all part of the same change as multiple IDs for install

florelis avatar Sep 07 '23 17:09 florelis

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!

jo-chemla avatar Sep 08 '23 08:09 jo-chemla