Install Applications and Tools on Windows Using Chocolatey

A step-by-step to install Chocolatey, and use it to install applications or tools on Windows 10 (or other Windows version)

M Aryo Muzakki
5 min readNov 1, 2023
Chocolate
Photo by Tamas Pap on Unsplash

Chocolatey is the package manager for windows founded by Rob Reynolds in 2011, and yes it is a third-party. In MacOS you have Homebrew and in Linux you might have apt, or yum, or other, depends on the distribution. In Windows 11, there is actually Winget (also available since Windows 10 version 1709). Aside from Winget, some people might use Scoop, Chocolatey, Ninite, or others. Winget include packages from microsoft store, but Chocolatey have more packages than Winget that was released in 2021.

Surely there are some pros and cons between package managers, but let’s skip this now because in this post I want to share to you about Chocolatey installation and usage in Windows 10 environment. Don’t forget to give me your thought about this post.

Install Chocolatey in Windows 10

To install Chocolatey in windows 10, you need to run a Powershell in Administrator mode, and make sure that Execution Policy is not restricted, because the command will execute an install script downloaded from chocolatey.

So, here are the steps:

Step 1:

Click on Windows Search, and Type “powershell” in the search input.

Using Windows Search to find Powershell App
Using Windows Search to find Powershell App

Step 2:

Right click on Windows PowerShell, then Click Run as administrator.
(Click “Yes” if there is a User Account Control popup).

Using Right Click to run Powershell in Administrator mode
Using Right Click to run Powershell in Administrator mode

Step 3:

Copy and paste this text to run the command to see your current Execution Policy:

Get-ExecutionPolicy

If it “AllSigned” or “Bypass”, go to the next step.

But if it is “Restricted”, then run this command:

Set-ExecutionPolicy AllSigned

Step 4:

So, if you already have the execution policy as “AllSigned” or “Bypass”, run this installation command:

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'))

Once installation is finished, try to run choco in the command line to confirm installation. If it show your chocolatey version, then chocolatey is installed correctly.

Successful Installation of Chocolatey v2.2.2
Successful Installation of Chocolatey v2.2.2

As you can see, I have Chocolatey version 2.2.2 installed in my computer.

Note:
If you get some error message like the Term ‘choco’ is not recognized as a cmdlet or something, then close current powershell window, and open the powershell again like in the step 1 and step 2. Then, try to run choco again, and it will works correctly.

Tip:
There are some methods to open Powershell with ‘Run as Administrator’ mode. My favorite method is using Run by pressing win + r then type powershell then press ctrl + shift + enter

Using Chocolatey

Best way to use chocolatey is from Powershell with ‘Run as Administrator’ mode. Once opened, you just need to run this command to install a package :

choco install <package_name>

Search for packages you want to install in chocolatey package list, you can also easily copy the command provided.

We are going to install Notepad++, if you have it already installed, try with other packages

Notepad++ is a lightweight text editor with a lot of helpful features for programmer. It’s package name is notepadplusplus , so we type this in powershell :

choco install notepadplusplus -y

-y in the end of the command line is an option used to auto confirm installation of packages, because they always ask you if you want to run the script or not.

Installing Notepad++ with Chocolatey
Installing Notepad++ with Chocolatey

And we are done. Try to search for Notepad++ in Windows Search, you will find the new installed app.

Confirm that Notepad++ is installed
Confirm that Notepad++ is installed

That’s an easy and simple way for me to install application. For an advanced way to install packages, you can also check the official chocolatey docs.

Install Multiple Packages with Chocolatey

Sometimes I want to install a couple of packages at a time, and typing one line of command for each packages is a repetitive action. So, is it possible to install multiple packages in one chocolatey command?

The answers is Yes.

Then, how?

You just need to add more package name after the first package, separated by space. Like this

choco install <package_name_1> <package_name_2> <more_package_name...> -y

For example, you want to install Notepad++, VLC Media Player, and 7zip, then you can run this command :

choco install notepadplusplus vlc 7zip -y

I guess that’s pretty straightforward, especially when you already have experience using other package manager.

There are more tricks about chocolatey that I share in my other posts, don’t forget to check it out. Links down below.

Conclusion

Finally, we succeed on installing Chocolatey in Windows 10. We just need to open Powershell in Administrator mode, make sure Execution Policy is “AllSigned” or “Bypass”, then run the installation script.

Using chocolatey to install a package is also easy and simple, search for packages available in chocolatey repository, then run the install command. It is even possible to install multiple package at the same time, just add more package name separated by space.

Thank you for reaching the end of this post, but it is not the end of the story because I have more story I want to share. So, leave your constructive feedback and it will help me improve the quality of my post. Don’t forget to share this to your friend, they might need this. See you in other post~

Reference / Useful Resources :

Check My Other Posts About Chocolatey :

  • Install Chocolatey Packages with packages.config File (Coming Soon)
  • Uninstall Chocolatey Package (Coming Soon)
  • A Batch Script to Install Multiple Apps and Tools Using Chocolatey (Coming Soon)

Hi👋 I am M Aryo Muzakki 😊. You can dm me at my instagram @aryo.muzakki or send an email to aryo.muzakki@gmail.com.
Don’t miss out any update of my personal useful tips on programming and it’s environment. Follow now or Subscribe now.

--

--

M Aryo Muzakki
M Aryo Muzakki

Written by M Aryo Muzakki

A self-proclaimed programmer. Sharing personal useful tips on programming and it's environment. Publish a few posts monthly. Follow or Subscribe now.