Windows Server

Windows Package Manager: How to install applications with Winget CLI

Windows package managers are a collection of tools that enable users to automate the installation, configuration, and updating of apps and programs. They deal with packages, or collections, of bundled files. Package managers make it easy to install, upgrade, or remove software for a computer’s operating system.

There is nothing more exciting than using a package manager to install apps instead of double-clicking boring executables. Linux users will be able to see similarities between the yum or the apt-get.
– For how to install Windows Package Manager (Winget CLI), see https://techdirectarchive.com/2020/05/23/winget-cli-how-to-install-windows-package-manager/

Note: If you do not see an app you use, just create a new manifest, and submit a pull request. For more information, see the Microsoft community Windows Package Manager manifest repository. I had to clone this to my PC to play with it 😉

Now that the Windows Package Manager is installed, you can start using winget in the Windows Terminal, Windows command line, or PowerShell. The command line client “winget.exe” is already pre-configured to point to the Microsoft community repository.

To see a full list of commands for the Windows package manager, simply type winget at a PowerShell prompt and a help screen will be displayed.

To use help for each command, you can just type the specific command and follow it with a -?
– For example, to see the help screen for the install command, you would enter the command:

– To search for an application: You can search for available packages with the command below if you are very sure of the application name.

winget search APPLICATION

When you are not sure of the name of the application, then use the following syntax without completing the application name.
– The command below will display all applications having the Microsoft name attached to it.

winget search Microsoft

If you want to see a list of all available packages, you also type “winget search” without any arguments, and the full list will be displayed. It is more useful when you use the “winget search | more” command to see a list of packages one page at a time.

To display information about an application:  This commands display information about a specific package available in the Microsoft Community repository. These details includes the version, its license, the program’s description, the developer, and where it will be installed from, we use the following command:

winget show APPLICATION

– Too install Packages: The command below will download and install applications from the GitHub repository.

– For how to install, upgrade and uninstall Chocolatey, see https://techdirectarchive.com/2020/05/25/windows-package-manager-how-to-install-upgrade-and-uninstall-chocolatey/
– How to install, upgrade and uninstall software with Chocolatey, see https://techdirectarchive.com/2020/05/25/windows-package-manager-how-to-install-and-uninstall-software-with-chocolatey/

Example 1: Let’s install Chrome
Note: If you have the User Access Control enabled on your system, you will be prompted to accept this. In this case,
– Click on Yes.

winget install APPLICATION

Example 2: Lets install Notepad++:

winget install notepad++

Listing package repositories: Package managers allow you to add repositories, or sources, that will be used to search for applications to install. While Microsoft plans on allowing you to add multiple repositories in the future, at this point winget only allows you to configure one at a time.

To manage your repositories/sources, you can use the winget source command.

winget source (add/list/update/remove/reset)

Below are some planned features for Winget 1.0

  • Dependency management
  • Uninstall apps
  • Install apps from the Microsoft Store
  • Update one or all installed apps
  • List installed apps
  • Group Policy control
  • Support for silent installs, though this may be used by threat actors when installing malware from their own repositories.

I hope you found this blog post helpful. If you have any questions, please let me know in the comment session.

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x