3 Ways to Download Software on Windows Using Command Prompt Only!
Installing a new program on Windows is a very easy
process that requires only simple steps, starting from searching for the name
of the program on the Internet using the browser, then downloading the
installation file and running it, then the process ends by pressing Finish,
after which it is ready to use! But this is not always the case, as sometimes
this process requires effort from you, whether to prevent the installation of the
adware extension or to adjust various settings before installation. Although
downloading programs through the browser is the prevailing and easiest way,
there are some other ways to accomplish this task using the command prompt
only, as programs can be installed directly through the CMD commands in
Windows, let us explain how through the methods that we review below.
Method 1: Use the WinGet command
If you have ever used Ubuntu or any Linux
distribution, you may be familiar with the [sudo apt-get] command, which is
used to install programs from the command prompt window or the
"Terminal". Instead of searching for the program on the Internet,
downloading the installation file, and going through the traditional steps, it
is executed One command and the operating system takes over the job of finding,
downloading, and installing the software without any of your intervention. The
Windows system, or at least the recent versions of it, includes the same
function under the name "WinGet" so that commands can be used to
install programs via CMD or PowerShell directly.
All you have to do when you want to download a new
program on Windows is to open the Command Prompt or "Windows
Terminal" if you are using Windows 11, then type the winget install
command followed by its ID and press Enter. For example, the "winget
install VideoLAN.VLC" command downloads and installs the famous VLC media
player. After executing the command, Windows will display the progress
indicator of the program's download process, and then it will start installing
it silently. All you have to do is wait for the "Successfully
installed" message to appear to find the program's shortcut in the Start
menu.a
This is all there is to it. You can install any other
program in the same way via the WinGet command, but to facilitate the process
of finding programs, I advise you to use the winget.run the site as a guide to
find the correct command to install any program. After visiting the site, type
the name of the program in the search field, and when It appears in the results
press "Copy command" and paste the command in the CMD window and
press Enter to start the installation of the program immediately.
Method 2: Use the Invoke-WebRequest command
In case you don't know, the advanced command prompt
PowerShell in Windows supports the ability to download files from the Internet
via a command called "Invoke-WebRequest", where images, videos,
compressed files, etc. can be downloaded directly from the Power Shell window
via this command. Therefore, it can also be relied upon to download programs,
but this requires obtaining the direct link to download the required program.
At first, launch the PowerShell or Terminal tool
through the Start menu or through the options menu that appears after clicking
the Win + X keys together. After opening the tool, type [cd Desktop] and press
Enter so that the program installation file is saved on the desktop after
downloading it. If you want to save the file in another folder, put the path of
this folder after “cd”. After selecting the location, it is time to give the
command to download the program file, which is as follows:
Invoke-WebRequest http://directURLhere -o download.exe
After copying this command, replace the "http://directURLhere"
part with the direct link to the program's installation file, which usually
ends in exe, win, or msi and may also end in rar or 7z if the file is
compressed. For example, to download the VLC media player installation file,
the command is as follows:
Invoke-WebRequest https://mirror.library.ucy.ac.cy/videolan/vlc/3.0.18/win64/vlc-3.0.18-win64.exe -o download.exe
Once you add the direct link and execute the command,
a progress bar will appear showing the size of the file being downloaded, and
it will take some time depending on the file size and internet connection
speed. In the end, a new file named "download.exe" will be created on
your desktop, which you can double-click to start installing the program.
Method 3: Use the Chocolatey tool
Chocolatey is one of the oldest tools available for
downloading, updating, and removing software through the command prompt. We had
already provided a distinct explanation about this tool in a previous article,
as the tool depends on a huge database that includes thousands of programs for
Windows, including professional programs from companies such as Adobe,
TechSmith, and others, so it can be relied upon if the previous methods fail
for any reason. one of the reasons.
All you have to do is open the PowerShell tool in
administrator mode (Run as administrator), either through the search or the
options menu that appears after clicking on the Win + X keys together, where
you choose “Windows PowerShell (Admin). After the command prompt appears, enter
the command [ Set-ExecutionPolicy AllSigned] and press Enter, and enter the
following command to install Chocolatey:
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'))
When done, you will be able to download and install
any software on your device with simple commands, for example, the [choco
install camtasia] command can automatically download and install Camtasia
Studio.
To facilitate the task, you can use the Chocolatey
repositories page to find the programs and the command necessary to install any
of them. There is a search bar at the top. Write the name of the program in it,
and if it is in the database, it will appear in the results accompanied by
information about the program’s function and the number of times it is
downloaded in addition to the download command.
Once you copy the download command, open the
PowerShell tool in administrator mode and paste the command and then press
Enter to immediately start the process of downloading and installing the
program, just wait for the Chocolatey tool to take over the entire task and the
installation confirmation message will appear at the end as shown in the
attached image above.