In this article, we will show you how to use a Windows package manager to install apps and programs using the command prompt.

Chocolatey Package Manager

Windows package managers are a collection of tools that enable users to automate the installation, configuration, and updating of apps and programs. Chocolatey is a secure and simple Windows package manager. Using a few bits of code, you can install apps and programs as well as manage and track updates. It is free and open-source for personal and business use.  For users who need advanced functionality, Chocolatey offers premium upgrades.

Install Chocolatey

From the Windows Start menu, search for Command Prompt and click Run as administrator.  

The command prompt will pop up in a window like the image below.

Type the following code into the command prompt and hit Enter.

During the installation process, you will see a lot of text scrolling by in the command window.

Install Apps Using the Chocolatey Windows Package Manager

To install apps, start by opening a text document on your desktop to make a list of the apps you want to install. Next, from a web browser, navigate to Chocolately’s app directory, the Community Maintained Packages. For each app you want to install, type the following command on your text file: choco install [name of package] -fy For [name of package] use the name as it appears in the app directory. For example, if you want to install Mozilla Firefox, use the following code: choco install firefox The -fy part of the command is a designation that tells Chocolatey to choose yes when any prompt pops up during installation. This helps to automate the process and make it as simple as possible. Every app you want to install should be on a separate line on your text file. Each line should be the same except for the name of the app. After listing all the apps you want to include, you can use a single line to install them all at the same time using the following code for the example above: Save your text tile and close it. It should have a .txt extension. If it doesn’t, you will need to enable File name extensions from File Explorer by following the steps below:

Enable File Extensions

Open File Explorer by clicking on the file icon at the bottom of your screen.

You can also open File Explorer by typing file explorer in the Windows search bar.

Click on the View tab at the top and tick off the checkbox next to File name extensions to enable it.

Once you can save your text file with .txt extension, rename it with a .bat extension. Right-click on your new .bat file and choose Run as Administrator.

This action will trigger Chocolatey to start and install all your apps. Save your .bat file for future reference or use.

Install Everything Using One Line

It is also possible to install all your apps and the Chocolatey Windows package manager at the same time with one .bat file. 

Open the .bat file you created and add it after the Chocolatey installation command as follows:

@”%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” choco install firefox -fy choco install install firefox -fy choco install adobereader -fy choco install 7zip.install -fy choco install notepadplusplus -fy choco install skype – fy The above command includes word wrap to make it easier to read. However, when you run the command, it should be one line as you can see below: Save your file so you can use it again when you need it to install all your favorite apps and Chocolatey at the same time. Use Chocolatey to install your apps and programs with the command prompt. It has a massive database of Windows packages that go through a rigorous review process. It is an automated tool that handles the mundane and time-consuming steps of getting and installing programs and apps for you. Users simply choose what they want to install, and Chocolatey will download the latest version without needing any input from you. Consider the situation where you want to upgrade all the programs and apps on your computer to make sure you are using the latest and most secure versions. To do this manually, you must:

Find the most recent versionSelect the correct downloadOversee the installation process so you don’t download anything you don’t want such as toolbars that are included by default and require you to uncheck themGo through this process for every program

Or, use the Chocolatey Windows package manager to open a command line, type: choco upgrade all -y Done. 

How to Use a Windows Package Manager to Install Windows Programs - 8How to Use a Windows Package Manager to Install Windows Programs - 63How to Use a Windows Package Manager to Install Windows Programs - 40How to Use a Windows Package Manager to Install Windows Programs - 74How to Use a Windows Package Manager to Install Windows Programs - 56How to Use a Windows Package Manager to Install Windows Programs - 51How to Use a Windows Package Manager to Install Windows Programs - 5How to Use a Windows Package Manager to Install Windows Programs - 81How to Use a Windows Package Manager to Install Windows Programs - 57