A package manager is a tool to install desired software and any other components on which that software depends. They do so by reading from a pre-configured package file, which lists dependencies, required configurations, where to retrieve binaries, and the order in which each step must occur.

Many software developers are familiar with package managers, such as NuGet (for Microsoft applications), PIP (for Python) and RubyGems (for Ruby). These are used to add components to a software project.

Chocolatey is a Package Manager designed specifically for installing desktop applications onto a Windows computer, outside of any software project.

You can get started using Chocolatey by navigating to https://chocolatey.org/. Chocolatey requires Windows and PowerShell (which comes pre-installed on current versions of Windows).

Install Chocolatey by opening a Command prompt and typing

@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
  

or by opening a PowerShell prompt and typing

Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
  

You will likely need to open those prompts as an Administrator. Close the prompt when you are done.

choco install openlivewriter -y choco install googlechrome -y choco install firefox -y choco install notepadplusplus -y choco install nodejs -y choco install git -y choco install putty -y choco install nodejs -y choco install visualstudiocode -y choco install paint.net -y choco install dropbox -y choco install fiddler -y choco install azure-cli -y choco install audacity -y choco install visualstudio2017enterprise -y choco install slack -y choco install filezilla -y choco install handbrake -y choco install gitkraken -y choco install camtasia -y choco install snagit -y choco install unity -y choco install azure-cli -y choco install curl -y choco install everything -y choco install spotify –y
choco install icloud -y choco install docker -y
choco install kindle –y
choco install microsoft-teams –y
choco install postman –y
choco install microsoftazurestorageexplorer -y

Once Chocolatey is installed, you can install software with the command "choco install ", followed by the name of the package. Uninstall software with the command "choco uninstall ", followed by the name of the package. You can find existing packages and their names at https://chocolatey.org/packages.

"choco install" and "choco uninstall" have a number of command line switches. I found "-y" to be the most useful, which answers "Yes" to any prompts to download or run software, saving you a lot of time and intervention.

My number 1 use case for Chocolatey is to re-install all my desktop applications after I reset a PC (delete all data and applications and re-install Windows). I have created a batch file named "ChocolateyInstallScript.bat" to install many of my favourite desktop applications.

The script is listed below:

 

I ran this script this morning after resetting my laptop. It ran for about an hour with no intervention from me. After an hour, all the apps were installed.

Below is part of the output:

Ch01

The best part is that, for what I am doing, Chocolatey is completely free!

For more information, check out the the Chocolatey documentation here or watch my interview with Chocolatey creator Rob Reynolds here.

Chocolatey provides a a simple way to install and manage desktop applications. It saved me time and energy when I rebuilt my machine.