Nextpertise a journal of interesting technical ideas . . .

Chocolatey Installer for Windows

by Brent Stewart on Tuesday, Jan 18, 2022

I’m setting up a new Windows 10 VM (this time in VMWare) and decided to use Chocolatey to install applications this time, since I tried winget last time. I haven’t tried Chocolatey in a while, and I’ve spent a lot of time exclusively in Linux since then so I was curious what I would make of it, especially in comparison to Winget.

Chocolatey is a package manager like apt. You can use it to search for, install, update, and uninstall programs. This is particularly useful if you have a “standard setup” for new computers - it’s possible to build a script to install the apps you expect. Windows Update only covers Microsoft programs, so Chocolatey fills another gap by updating all the programs it installs from the command line.

Logo

Chocolatey

Chocolatey is free open-souce software that has been around for a while and I’ve used it before. Chocolatey works like apt, using the choco command. You can search for a package, install it, or uninstall it. Choco upgrade will upgrade all the Chocolatey-managed applications on your system. This last piece is especially useful, since Windows Update focuses just on Microsoft properties.

Chocolatey uses the command choco. The command sequence below shows looking for all packages in the repository that are include “libre”. That allows me to see the name of the LibreWolf package, which I then choose to install. Finally, the upgrade command can be used to upgrade specific packages or to get them all.

choco list libre
choco install librewolf
choco upgrade all

Use choco list –local-only to see a list of programs installed on the local system by choco. There’s also a GUI, installed by choco install chocolateygui.

Choco compares very well to Microsoft’s winget. The application set available seems a little larger. Like winget, choco will be familiar to apt users (but there are some syntactical differences. I used winget to easily install Git, WinFSP, SSHFS, the Microsoft Terminal, and Librewolf. A later upgrade picked up new versions of Librewolf and Git and installed them without difficulty. Choco also seemed to apply some KB patches I was missing and even upgraded itself!

Installation

Setup is very easy. Installation can be done from an administrative powershell using these commands:

Set-ExecutionPolicy AllSigned
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

Pretty Solid

When I tried winget, I had issues with dependencies. Chocolatey picked these up and installed without an issue, so Librewolf grabbed the Visual C redistributable module and installed it without prompting, for instance. Choco has a wide range of supported applications, particularly if you like to use FOSS.

The biggest issue with Chocolatey is image. The name doesn’t build credibility, and with Microsoft building a competing product now I expect IT departments to focus on winget. That said, choco is a more complete solution with a bigger catalog as of today and it’s definitely the better fit for home.



References:
  https://chocolatey.org/
  
https://ohmyposh.dev/docs/windows

Recent articles related to these tags:
windows shell
Share this article:   
Tweet