Skip to content

Commit dfdc0dc

Browse files
committed
chore(post): add easy software updates
1 parent ae1982b commit dfdc0dc

File tree

3 files changed

+94
-0
lines changed

3 files changed

+94
-0
lines changed

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
"typeof",
5959
"Unprotect",
6060
"webp",
61+
"winget",
6162
"wireframes",
6263
"WORKDIR",
6364
"wwwroot",
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
---
2+
title: Easy software updates
3+
description: An introduction to winget tool for managing software on Windows computers.
4+
date: 2024-10-26 04:21:11 +0400
5+
last_modified_at: 2024-10-26 04:21:11 +0400
6+
published: true
7+
categories: [Posts, Software Development]
8+
tags: [Winget]
9+
mermaid: false
10+
media_subpath: /assets/media/2024/easy-software-updates/
11+
image: cover.webp
12+
---
13+
14+
## Introduction
15+
Software and applications make our lives easier every day. We use them a lot. Much of it has migrated to the web so we can use it from any device without having to download and install it. There is still a lot of software that we need to install on our machines. This is especially true for software development.
16+
17+
Keeping software up to date is a tedious task. It takes time and effort. But it allows us to take advantage of the latest features and security updates. Other systems, like Linux, have a package manager that makes it easy to keep software up-to-date that has been around for decades. Mobile platforms like Android have application stores that do it for us. On Windows, we had to do it manually for too long. Fortunately, today we have a number of options for Windows, including the Microsoft Store and a package manager.
18+
19+
## Getting started
20+
Winget is a package manager for Windows. It is available as a command-line tool that allows you to install, update, and uninstall software on Windows. If you are using Windows 10 or later, then you may already have it installed.
21+
22+
Go to Command Prompt or PowerShell from the Start menu and type `winget`.
23+
24+
```shell
25+
C:\>winget
26+
Windows Package Manager v1.8.1911
27+
Copyright (c) Microsoft Corporation. All rights reserved.
28+
29+
The winget command line utility enables installing applications
30+
and other packages from the command line.
31+
32+
usage: winget [<command>] [<options>]
33+
```
34+
35+
Here is a list of the most common commands:
36+
37+
| Command | Description |
38+
| ----------------------- | -------------------------------------- |
39+
| `winget search <name>` | Search for an application in the store |
40+
| `winget install <id>` | Install an application |
41+
| `winget uninstall <id>` | Uninstall an application |
42+
| `winget upgrade <id>` | Upgrade an application |
43+
| `winget list` | List installed applications |
44+
| `winget upgrade` | List available updates |
45+
| `winget upgrade --all` | Upgrade all applications |
46+
{: .m-auto }
47+
48+
> `update` is a command alias for `upgrade`, so you can use either of them.
49+
{: .prompt-tip }
50+
51+
The good thing about winget is that it requires an installer that supports silent installation mode, so we can avoid clicking the "Next" button in the installer wizard by passing the `--silent` argument. This makes it possible to use winget in scripts or to update all software at once without any disturbance. However, some applications may not support this mode, so you may need to use a GUI to install or update them.
52+
53+
```shell
54+
winget update --all --silent
55+
```
56+
57+
However, if you prefer to have more control over the update process, you can use the `--interactive` flag (or `-i` for short), which will let winget download an installer for you, while you can decide with the installer options to proceed.
58+
59+
## Making it yours
60+
When it comes to everyday use, you may want more control over the update process. There are standalone applications that provide a GUI for winget and other package managers and include additional features like automatic updates, notifications, backup and restore list of software and more to make it as easy as possible to keep your software up to date.
61+
62+
There are a number of options, some are free and open source, some are paid. Many options are outdated or use and maintain their own list of software they support. The option I have been using for a while is UniGetUI. It is a free and open source application that supports winget and other package managers. It is available on GitHub and the Microsoft Store. Like many other applications these days, it can be installed using winget.
63+
64+
```shell
65+
winget install --exact --id MartiCliment.UniGetUI --source winget
66+
```
67+
68+
## Winget sources
69+
By default, winget collects the list of software from the Microsoft Store (free applications rated "e" for everyone) and the winget community repository. You can see this by running the `winget source list` command. It's possible to add or remove sources that would be useful for corporate environments.
70+
71+
```shell
72+
C:\>winget source list
73+
Name Argument Explicit
74+
--------------------------------------------------------------
75+
msstore https://storeedgefd.dsx.mp.microsoft.com/v9.0 false
76+
winget https://cdn.winget.microsoft.com/cache false
77+
```
78+
79+
So for typical use, to support winget for your application, you need to publish your application to the Microsoft Store or add it to the winget community repository. You can find more information about the winget community repository and creating manifest files in the references section below.
80+
81+
## Winget alternatives
82+
It is worth mentioning that there are other package managers for Windows, such as Chocolatey. Some of them became popular because there were no alternatives 10 years ago. However, some are still very popular.
83+
84+
## Conclusion
85+
Ubuntu Software Center contains many applications, but is not favored by many users and is still far from being something like Google Play Store. Especially for more experienced users who are used to the command line. Most official and community provided Ubuntu documentation, as well as third party software installation guides, usually instruct users to use commands like `apt-get` from the shell. This makes it more widely known and used, especially for those following online instructions. I can't say the same for the Microsoft Store, but I don't see its popularity growing much. Maybe things will change in the future. In the meantime, you can use winget to manage your software and keep it up to date.
86+
87+
## References
88+
- [UniGetUI](https://github.com/marticliment/UniGetUI)
89+
- [Create your package manifest](https://learn.microsoft.com/en-us/windows/package-manager/package/manifest?tabs=minschema%2Cversion-example)
90+
- [Windows Package Manager Community Repository](https://github.com/microsoft/winget-pkgs)
91+
- [Winget training](https://docs.microsoft.com/learn/modules/explore-windows-package-manager-tool/?WT.mc_id=AZ-MVP-5004737)
92+
- [Winget packages index](https://winget.run/)
93+
- [Chocolatey](https://chocolatey.org/)
Binary file not shown.

0 commit comments

Comments
 (0)