Installing apps on Windows is a tedious process. The user should check for the recent version of the app, download the installer file, then manually install the app (following several times) and uncheck unwanted bundles.
The problems don’t end there. Software installers in Windows have different ways of configuring applications, registries, and configurations. With so many combinations, people just skip the hassle of updating apps. We are going to show you how to install software using Command Prompt (CMD) in Windows 10.
Solution: Chocolate (Package Manager)
According to Microsoft Docs, a package manager consists of command line tools and a set of services to automate the entire software management process. The package consists of software binaries, configuration files, and metadata. And the metadata, in turn, contains the details of the application and the list of dependencies to make it work properly.
Until now, the Windows operating system lacked a full package manager. The launch of WinGet with new features and bug fixes (version 1.1) raised further doubts. It makes sense to ask why you should choose a third-party package manager called Chocolate? Here are a few reasons:
If you are using Winget, you will sometimes need to click on a setup wizard or security prompt, which diminishes the benefit of having a command line tool.
Uninstall support, compared to Chocolatey, is still rudimentary. Sometimes it fails to handle the dependencies.
Only a few packages support upgrades during testing. It could not update the apps even though a newer version was available.
A package manager can run scripts, provide server management, centralized reporting, custom configuration, and more. Winget can only handle a few formats, like EXE, MSIX and MSI.
Chocolatey works with over 20 installation technologies for Windows. He knows how to configure an application, a registry, manage files and configuration, or any combination.
Installing Chocolatey on Windows 10
To install Chocolatey, you need to complete the basic system configuration and have the patience to install a few scripts:
System Requirements For Chocolatey
Before you start, make sure your PC meets the following criteria:
Windows 7 + / Windows Server 2003+ and above.
PowerShell v2 + (minimum is v3 for installation from this website due to TLS 1.2 requirement).
.NET Framework 4+ or higher.
Free space for Chocolatey CLI and a few GB for installing packages.
Installing Programs Using the PowerShell Method
hurry Win + X and select Windows PowerShell (administrator). Then you need to make sure that Get-ExecutionPolicy is not restricted. Read our guide to PowerShell to learn about its importance.
If it comes back Limit, then run Set-ExecutionPolicy AllSigned Where Set-ExecutionPolicy Bypass -Scope Process. hurry Yes to confirm the change.
Then copy-paste the 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'))
In a few moments Chocolatey will install itself and create a new folder in Program data. All packages go to chocolate lib (there may be exceptions for .MSI installers). Once Chocolatey is installed, restart the PowerShell and type choco -? to see the list of commands.
Installing programs using the command prompt method
hurry Win + X and choose Command prompt (administrator). Then copy-paste the command:
@"%SystemRoot%System32WindowsPowerShellv1.0powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "[System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%chocolateybin"
hurry Enter. Restart the prompt and type choco -? to see the list of commands.
Chocolatey packages are a modified NuGet package. This is a compiled .nupkg file that consists of package metadata and additional data specific to Chocolatey. The package repository The website has a huge collection of apps and you can use them to install popular apps for Windows 10.
Each package submitted to the database is subject to a rigorous moderation process before it goes live. They include package validation, verification, virus scanning with VirusTotal, and more. On the left side you will see the links to the package maintainer, the validation check button in green, red and yellow.
Under the Individual section, you will see the command to install, upgrade or uninstall the app. The Version history lists all versions, including their changelog. Finally, the section under Dependencies lists all of the additional components required for an application.
How to install software using Command Prompt or PowerShell
You need to follow some basic syntax rules to install software from the command line tool. The structure looks like
choco [command][package name]
“choco” is the short name for Chocolatey. The second prefix is the actual command and the third is your application. Once you get used to it, you will no longer have to consult the order reference list for software management.
Here are some common commands that you will use frequently. We will take the example of installing the GIMP image editor.
Install a package
Head to the repository package site and search for GIMP. Then type:
choco install gimp
The command will download and install the app without any action on your part. You will see the progress information in the console itself. In a few cases, your app may display windows, but that’s okay. Chocolatey will automatically take care of all installation steps.
Uninstall a package
choco uninstall gimp
If an application has a list of dependencies, Chocolatey will automatically remove those components from your system.
Find your package
You can even search for a particular package with this syntax:
choco search [package name]
For example, if you want to install 7-zip, type:
choco search 7-zip
hurry Enter. Chocolatey will search for each application with the word “zip” in its database. If it’s there, you’ll find it in the results. Finding a particular application takes a bit of practice.
Upgrade a package
To upgrade an application, enter:
choco upgrade [package name]
choco upgrade gimp
List of obsolete packages
It is also possible to see the list of all obsolete applications. For this to work, you need to install apps through Chocolatey. Type:
Is there a chocolate graphical interface?
While the command line tool is the preferred method for managing apps, some of you may like a real app. Chocolatey GUI allows you to install, uninstall, update and find packages in one place. To install it, type:
choco install chocolateygui
To check for updates:
choco upgrade chocolateygui
When you launch the app, you will see two options in the left pane. This PC, as the name suggests, consists of packages installed on your PC. At the top left is the search box and options to find obsolete packages, update all packages at once, and switch between list / tile view.
Chocolate is the remote package repository. At the top, you’ll see options to filter apps by version, include beta, popularity, and more.
To update a single package, right-click on it and choose Update. You can export currently installed packages (as a .config file) with their version number and date of installation. You can use this file to install packages on another machine.
Install your next app with the command prompt
Many people still find it difficult to update their apps. Chocolatey lets you install a dozen or more apps with just a few keystrokes. You can easily manage your applications without any security or bundleware issues.
Modern operating systems give you easy ways to set up new applications. But what actually happens when you run this installer or run this command?
About the Author