I guess it is a popular idea that when users experience working with the Command line, they cannot stop using this tool and try to replace it with other methods they know to do their tasks. In this article, you will learn How to Install Programs in windows From Command Line. Ease and speed of installing apps through the command prompt is the most important reason that even Windows users prefer to install applications from the Windows Command Line after buying Windows VPS to get rid of the manual time-consuming process of downloading and installing the necessary files.
Using Command Line to Install Apps in Windows; Yes or No?
Install, upgrade, remove, and configure applications on Windows are the essential and initial tasks that users are used to doing while they are working on a Windows server. Installing apps on Windows from command line is so easier and faster than running individual .EXE files to install applications, and then going through the installation wizard. If you do not receive an error, the installation is finished. But why not use a single cmdlet instead of time-assuming and complicated processes?
Windows software installers have many methods for configuring programs, registries, and configurations. People simply skip the trouble of updating programs since there are so many options. In this tutorial, we will show you how to install programs in Windows from Command Line.
Tutorial Install Programs in Windows From Command Line
Let’s go through this guide to review some handy methods to install programs in Windows from Command Line and replace them with complicated ways we were already using. In the end, you will get skilled with three different easy solutions to install all your favorite and required software in Windows Server from Command Line.
Solution 1. Using Scoop to Install Apps on Windows
If Scoop is not already installed on your Windows system, just log in as an administrator user and launch PowerShell to install Scoop on your Windows Desktop or Windows Server. Then, run the command below to install Scoop:
Now, Scoop must be installed in its default location. To let the installer download, extract, and install Scoop, run:
Set-ExecutionPolicy RemoteSigned -scope CurrentUser iex (new-object net.webclient).downloadstring('https://get.scoop.sh')
Once you see the below screen, the Scoop is installed successfully.
How to Enable multi-connection downloads
Scoop can use aria2 to perform multi-connection downloads. Install aria2 using Scoop, and it will be used for all subsequent downloads.
scoop install aria2
For example, you can install multiple applications by running the following command and separating your considered application with space:
scoop install aria2 wget curl grep sed less touch vim sudo
How to Use Scoop on Windows
Take a look at the below table to review the Scoop commands you can use:
|alias||Manage scoop aliases|
|bucket||Manage Scoop buckets|
|cache||Show or clear the download cache|
|checkup||Check for potential problems|
|cleanup||Cleanup apps by removing old versions|
|config||Get or set configuration values|
|create||Create a custom app manifest|
|depends||List dependencies for an app|
|export||Exports (an importable) list of installed apps|
|help||Show help for a command|
|home||Opens the app homepage|
|info||Display information about an app|
|list||List installed apps|
|prefix||Returns the path to the specified app|
|reset||Reset an app to resolve conflicts|
|search||Search available apps|
|status||Show status and check for new app versions|
|uninstall||Uninstall an app|
|update||Update apps, or Scoop itself|
|virustotal||Look for app's hash on virustotal.com|
|which||Locate a shim/executable (similar to 'which' on Linux)|
Using the scoop help, explore other options.
How to Search a Specific Package with Scoop
Using Scoop, you can use the search option to find all the available packages. For example, to locate the path of the binary executable file, type:
scoop search which
We can determine which tool is available for installation based on the output. To obtain it, run the
scoop install which
How to Uninstall a Package with Scoop
So far, you learned how to install programs in Windows from command line. In any necessary situation, run the command below to uninstall your preferred apps on Windows:
scoop uninstall sed
How to List Scoop installed Applications in Windows
To get a list of all installed applications, use the list command:
How to Update Programs installed with Scoop
You can simply update your applications on Windows using the following commands. The first command installs git first which is required to do the updates. Then, you are ready to update all installed applications. For example, to update vim, you can use the last command of this part:
scoop install git openssh scoop update scoop update vim
How to Set Configuration Values for Programs
To set configuration values for apps, you can use the command below. Here, you will set aria2 retry to 10 times.
scoop config aria2-retry-wait 10
Run the following command to disable aria2:
scoop config aria2-enabled false
How to Remove Applications Old Version in Windows
As you reviewed in the above table, you can cleanup apps by removing old versions. To do this, simply type:
scoop cleanup vim
Solution 2. Using Winget to Install Apps on Windows
So far, you learned how to Install programs in Windows from Command Line using Scoop. In this part, you will learn how to use Windows Package Manager to do the same. On Windows, you may use simple commands to discover, download, and install practically any app that has been registered in the Windows Package Manager repository, including those from the Microsoft Store. A package manager is a collection of command-line tools and services that automates the complete software management process. The program binaries, configuration files, and metadata are all included in the package. And the metadata, in turn, contains the app’s details as well as a list of dependencies required for it to function effectively.
Windows Package Manager (Winget) is used to download and install applications on your Windows Desktop/Server. As a command-line tool, Winget helps Windows users to install apps on Windows easier with Command Prompt.
How to Use Winget to Search Apps on Windows
You can use winget to search your required apps and install them with commands on Windows. It is not really complicated. Follow the below path to do this:
Open Start > Search for Command Prompt > Select the Run as administrator option > Run the command below to search your considered softwares and press Enter:
winget search APP-NAME
Keep in mind to replace the app you want to install name with
Then, Validate the app name and ID value. After you’ve finished the procedures, you can use the app name or ID to install it with the Windows Package Manager utility. When you use the search command, the “Source” column will indicate if the software is accessible via the Windows Package Manager (winget) or the Microsoft Store (msstore) repository. You’ll also notice that the structure of the app ID varies based on the source.
How to Use Winget to Install Apps on Windows
Install programs in Windows from Command Line is really easy and interesting. Follow the path below to install your preferred apps with the winget command:
Open Start > Search for Command Prompt > Select the Run as administrator option > Run the following command to install the apps you need with the winget command and press enter:
winget install "APP-NAME"
Do not forget to replace your considered app name with
Note: Only when the software name contains numerous words separated by spaces, quotation marks are necessary.
To install an app by ID, run the following command and press Enter:
winget install APP-ID
You can use the app name, but the ID option is preferable because it is more specific, allows you to select the source repository, and results in fewer conflicts when performing the task.
How to Install Multiple Apps with Winget
You can use winget to install more than one program at the same time. To do this, you just need to follow the below path:
Open Start > Search for Command Prompt > Select the Run as administrator option > Run the following command to install multiple apps at a time with the winget command and press Enter:
winget install "APP-NAME-1" -e && winget install "APP-NAME-2" -e
Again, keep in mind to replace your preferred software name with
Also, you can use the command below to install multiple apps by ID. To do this, run the following command and press Enter:
winget install --id=APP-NAME-1 -e && winget install --id=APP-NAME-2 -e
Note: To queue more program installations, you can add a space and && along with the above command.
How to Check Installed Applications with winget
When you install programs from Command Line in Windows, you can check all installed apps using winget. To do this, follow the path below:
Open Start > Search for Command Prompt > Select the Run as administrator option > Run the command below to view the list of the apps installed on Windows Server and press Enter:
As an optional step, you can confirm the app installation displayed in the above step. To do this, use the command below and press Enter to confirm whether the app has been successfully installed on Windows.
winget list APP-NAME
Solution 3. Using Chocolatey (A third-party package manager)
As you learned, A package manager is a collection of command-line tools and services that automate the complete software management process. Chocolatey is a third-party package manager that comes with some better facilities compared with winget. Adapted NuGet packages are known as Chocolatey packages. It is compiled.nupkg file with package metadata and other information particular to Chocolatey. You may install well-known Windows programs using the website’s package repository, which features a big library of apps.
Each package that is contributed to the database must pass a rigorous moderation process before it can be made public. They consist of package validation, confirmation, VirusTotal virus screening, and other things. You’ll see the green, red, and yellow links to the package maintainer and validation check button on the left side.
Let’s see Why to Use Chocolatey?
When using Winget, you may need to navigate through a setup wizard or a security prompt, which reduces the utility of having a command-line tool. In comparison to Chocolatey, uninstall support is still limited. It sometimes fails to manage dependencies. Only a few packages allow for testing upgrades. It was unable to update apps, despite the fact that a newer version was available. A package manager can run scripts, manage servers, give centralized reporting, custom settings, and more. Winget can only handle a few file formats, including EXE, MSIX, and MSI. Chocolatey supports approximately 20 different installer technologies for Windows. It can set up an app, a registry, handle files and configuration, or any combination of these.
With just a few clicks, Chocolatey enables you to quickly install a dozen or more apps. Without having to worry about bundleware or security issues, managing your programs is simple.
If it now makes sense for you to install Chocolatey on your Windows, make sure that your system is meeting below specifications:
- Windows 7+/Windows Server 2003+ and above.
- PowerShell v2+.
- .NET framework 4+ or above.
- Free space for Chocolatey CLI and installing packages.
How to Install Apps Using the PowerShell
To install programs with PowerShell, press Win + X and select Windows PowerShell to run the command below and press Enter:
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'))
Chocolatey will be installed in a matter of seconds and will generate a new folder under Program Data. All packages are stored in \chocolatey\lib. After installing Chocolatey, restart PowerShell and execute choco -? to see the list of commands.
How to Install Apps Using the Command Prompt
To install programs with Command Prompt, press Win + X and select Command Prompt to run the command below, and press Enter:
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.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%\chocolatey\bin"
Then, restart the prompt and type in choco -? to see the list of commands.
Running the command below allows you to install software from the command line tool. The main syntax is as shown below:
choco [command][package name]
Chocolatey is referred to as “choco” in short. The actual command is the second prefix, and your program is the third. You won’t need to refer to the command reference list for program management once you get into the habit.
How to Install a Package Using Choco
To install your considered package, search for the name of it on the repository package website and run:
choco install [package name]
Without your involvement, the command will download and install the application. The progress details are displayed directly on the console. Your software may occasionally display windows, but that is completely normal. All of the installation procedures will be handled automatically by Chocolatey.
How to Uninstall A Package Using Choco
To uninstall the app you have installed before, type:
choco uninstall [package name]
How to Search A Package Using Choco
To search for a specific program, you can use the syntax below:
choco search [package name]
How to Upgrade A Package Using Choco
To upgrade the app you have installed before, run:
choco upgrade [package name]
How to View Outdated Apps List
Run the following command to list the outdated Packages you have installed through Chocolately.
How to Use Chocolatey GUI to Install Programs
If you prefer an actual app, even if the command-line tool is the preferred technique for managing apps. You can install, uninstall, update, and search for packages all in one spot using the Chocolatey GUI.
Run the following command to install Chocolatey GUI:
choco install chocolateygui
You can use Chocolatey GUI to check for updates. To do this, simply run:
choco upgrade chocolateygui
The search bar and buttons to check for out-of-date packages, update all packages at once, and switch between list and tile views are located at the top-left of the page. The remote package repository is called Chocolatey. You may filter programs at the top by version, beta release, popularity, and other factors.
Simply right-click a package and select Update to update it. The installed packages can be exported (as a.config file) together with their version and installation date. This file can be used to install packages on a different computer.
In this article, you learned How to Install Programs in Windows. from Command Line. If you follow the above solutions, you can install all your required applications without any errors but do not hesitate to contact us if you encounter any problems. Our technical support team will try their best to solve your problems. If you know any other method, then the comment section is all yours.