Install Windows Programs From One Line

In short. I typed winget upgrade once on this machine. Forty-two programs came back with updates pending. Wireshark, yt-dlp, tools whose names I had forgotten, one after another. Finding each homepage and downloading each installer would have taken half a day.

Dotori Bluetooth Numpad - Your phone as a 17-key number pad

A free app I built myself. Give it a try.

Linux has apt and the Mac has brew. Windows has tools that do the same job, and there are three of them. This post covers what separates winget, Chocolatey and Scoop, and which one to pick. The conclusion first: start with winget and fill the gaps with the other two.

winget is already on your machine

winget is Microsoft's official tool. Windows 11 ships with it, and recent Windows 10 gets it bundled with App Installer from the Store. That means there is nothing to install. Open a terminal, type the following, and if you get a version you are ready.

winget --version

Three things are enough to use it. Find by name, install by id, upgrade everything at once.

winget search git
winget install Git.Git
winget upgrade --all

The results of winget search include an id column. It is safer to install by that id than by name. That stops a similarly named but unrelated package from being picked up.

Chocolatey and Scoop fill the places winget leaves empty

Chocolatey is the elder, around since 2011. Its community repository holds close to ten thousand packages. Each package carries its own install script, so it handles installation options in fine detail. The default install location is C:\ProgramData\chocolatey and it needs administrator rights. The open-source edition is Apache 2.0 licensed, so it is free to use at work. A separate paid business edition adds more features.

Scoop has the opposite character. It unpacks programs inside your user folder only (C:\Users\<user>\scoop). It needs no administrator rights and does not touch the registry. For anyone who cannot get administrator rights on a work machine, that is decisive.

Packages are grouped into "buckets". When something is not in the default bucket you add another, as in scoop bucket add extras. The bucket sizes I measured on my machine were 1,637 in main, 2,372 in extras and 336 in java.

One table separates the three

ItemwingetChocolateyScoop
Separate installNot neededNeededNeeded
Administrator rightsUsually neededNeededNot needed
Install locationSame as a normal installC:\ProgramData\chocolateyUser folder
What it does wellGeneral programsInstall-option control, company rolloutsDeveloper tools, machines without rights

Scoop installs in two lines from an ordinary, non-administrator PowerShell window. The first line permits script execution.

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression

The payoff comes when you set up a new machine

For installing one program, a command and a mouse are about the same. The gap opens when you get a new computer. winget exports the list of what is installed now to a file. That file restores all of it on the new machine.

winget export -o apps.json
winget import -i apps.json --accept-package-agreements --accept-source-agreements

The exported apps.json is just a text file. Open it in Notepad and delete lines you do not want. The two options on the end skip the agreement prompts during installation. Without them the run stops at each program waiting for confirmation.

Summary

Windows installs and updates programs from the command line too. winget is already there, so there is nothing to prepare. Add Scoop when you have no administrator rights. Add Chocolatey when you need fine control over installation options. The three do not conflict, so keep them on one machine together.

Open a terminal now and type winget upgrade. It takes a few seconds to find out how many updates have been piling up.