PC Pro

WINDOWS 10

Keep apps up to date the easy way p48

-

I f you’ve ever used Windows, it’s a fair bet that you’ve installed the odd software package – be that Chrome, Word or Fortnite.

And, no doubt, you did it in the usual way, by opening up the File Explorer, launching setup.exe, clicking through a series of confirmati­ons, waiting for the necessary files, libraries and settings to be installed, then finally clicking “Close” to finish up.

While this process is easy for beginners to get along with, all that clicking and waiting around is hardly efficient. If you have several apps to set up it can be a real pain, as you can’t start a second installati­on until the first is complete.

Fear not, though. A better way is at hand, as long as you’re not afraid of a little typing. In May of this year, Microsoft unveiled the new Windows Package Manager (WPM), a text-based installer that lets you download and deploy an extensive selection of apps and games – including plenty of well-known desktop applicatio­ns – by simply entering a single short command into the command prompt or a PowerShell session. It’s far faster and simpler than working via a graphical installer, and it’s ideal for scripting.

If this all seems eerily familiar, that suggests you’ve had some past exposure to Linux, where text-based package managers are the default method of installing software.

On Windows, though, it’s a novel departure – so new, indeed, that it’s still under developmen­t. Here’s how to be one of the first to get on board with WPM.

THE CURRENT STATE OF WPM

At present, WPM is officially “in preview”: when it’s ready for release, it will be rolled into an official Windows 10 update, but it’s currently only included in experiment­al Insider builds.

Happily, you don’t need to switch onto an unstable OS to try it out, as Microsoft has created a standalone Insider programme specifical­ly for WPM. It’s available to anyone running build 1809 of Windows 10 or later, as long as you’re logged in with a Microsoft account. Joining the programme is as simple as visiting pcpro.link/314wpm, entering your email address and hitting Submit.

After enrolling, you’ll receive an email confirming your registrati­on, and containing a link to the latest version of the App Installer package on the Microsoft Store; once you’ve installed this, you should be able to open a command prompt or PowerShell session, type in winget – the name of the command that drives WPM – and then see a list of available operations.

We say you “should be able to” because, as is the way with pre-release software, the App Installer doesn’t always up date like it

should. If you get an error message saying the winget command isn’t recognised, you can install WPM manually: as part of Microsoft’s recent commitment to open source, it’s freely downloadab­le from the GitHub code repository. To download the installer, visit pcpro.link/314git1 and click on the file with the . appxbundle extension. Once it’s downloaded, launch it and the updated framework will be installed in a few seconds. If you take this route, you may not automatica­lly receive future updates to WPM: we recommend you check back on the GitHub page from time to time to see if a new version is available.

As always, pre-release software comes with a few other caveats too. We haven’t heard of any issues with software installed via WPM, but it’s possible they could arise. Even if everything works perfectly, the workings of the winget tool will certainly evolve before its final release, meaning the details below don’t come with any guarantees. Of course, nothing about Windows 10 comes with any guarantees, but that’s a different issue.

INSTALLING YOUR FIRST APP

Once you’ve got WPM installed, you’ll want to see what it has to offer. Enter winget show and it will briefly check the online software catalogue (which is hosted and maintained by Microsoft) before spurting out a list of available packages. As you’ll see, the list is lengthy: even at this early stage in WPM’s developmen­t, there are nearly a thousand apps, games and utilities available, and as time goes on the number will probably grow much larger.

This brings us to one drawback of the text-based approach: it doesn’t exactly make it easy to browse through what’s on offer. The main tool at your disposal is the winget search command, which you can utilise to find items that feature a particular term in their name or descriptio­n.

For example, type winget search browser and you will be rewarded with a list of web browsers that can be installed, including Firefox, Google Chrome, Opera and Vivaldi. As you can see, although Microsoft hosts the software library, it isn’t precious about who’s allowed in.

Now let’s use winget to install Vivaldi. The syntax is as straightfo­rward as you could ask for – and it’s not case-sensitive – meaning we can achieve this by simply entering winget install vivaldi. A progress bar will then appear as the latest version of the installer is downloaded from the Vivaldi’s website, after which the software is automatica­lly installed with no further interactio­n from you. The Vivaldi browser will then appear in your Start menu, as if you had used the standard graphical installer.

(If the installati­on fails, try opening either a command prompt or PowerShell session with Administra­tor privileges and running winget from there.)

Using the package manager really is that easy – except that not all packages can be installed by simply providing the name of the app. For example, type winget install firefox and you’ll get a response pointing out that there are multiple packages matching that name – the regular Firefox app and the Taiwanese version.

What’s needed is a permanent, unambiguou­s way to refer to each individual package, and this is provided in the form of a unique ID for the two different Firefox apps: the standard installati­on is called Mozilla. Firefox, while the Chinese edition is called Mozilla.Firefox.Firefox_v79.0. It’s a bit odd

that the latter ID doesn’t reflect the fact that this version of the software is in Chinese, but that’s indicated by the version number “79.0 (ZH-TW)”, and you can get more informatio­n about any package in the repository using the show keyword. If you enter winget show

Mozilla.Firefox, for example, you’ll see details of the app’s publisher, installati­on source, licence, interface language and so forth.

For everyday use, that’s all you need to know about WPM. You can now easily create a batch file to install your favourite apps on a new PC, or quickly grab a tool without having to go through the rigmarole of finding, downloadin­g and running a graphical installer.

WHAT WPM CAN’T DO

WPM works very well so far as it goes – but its capabiliti­es are quite limited at the moment. One big shortcomin­g is that the current build can only install programs, not remove them. Unwanted items have to be expunged the old-fashioned way, by going into the Apps & features Settings pane and clicking the Uninstall button.

Hopefully, an uninstall feature will be added in the future: most programs in the library use a standard Windows installer running in “silent” mode (you can launch them in interactiv­e mode by appending -i to the winget command, should you so wish), meaning there’s no obvious reason why WPM shouldn’t be able to invoke their uninstalle­rs in the same way.

Another feature we’d love to see is the ability to check for and install updates to previously downloaded apps. It’s something that Linux-based package managers have long offered – even allowing you to refresh all your installed apps at once with a single command. On Windows, however, this still might be some way off: currently, WPM focuses solely on finding and installing packages, and lacks any mechanism for maintainin­g them once they’re installed on your system.

It’s also worth noting that right now the package manager only officially works with traditiona­l desktop apps. The latest version does include experiment­al support for Microsoft Store apps, but this is limited to a small selection of items, and is disabled by default. Commercial software is notably absent too: Microsoft intends for WPM to support paid-for apps, but the package manager model provides no way to take payment before installing a program, so commercial applicatio­ns will need to include integrated payment systems.

SAFETY AND SOURCES

WPM makes the installati­on process easy, but it also makes it quite opaque. Since the whole point is to remove the need for user interactio­n, everything gets installed with default settings, meaning it’s a good idea to check what decisions have been made for you. Depending on the app, you might discover some unwanted behaviours, such as phoning home, popping up unwanted requesters or launching every time

Windows starts.

The good news is that it’s unlikely that you’ll download any actual malware. Microsoft proclaims that every installer in its repository has been analysed by its SmartScree­n filter, and SHA hashes are checked to ensure that anodyne files can’t be quietly replaced with hacked versions. It’s conceivabl­e that bundleware or junk software could wind up in the repository, but the risk shouldn’t be greater than downloadin­g installers directly from the publisher’s site.

We’ve one caveat, however:

WPM comes preconfigu­red to connect to Microsoft’s central software repository, but it’s capable of installing apps from any source, as long as they’re packaged in the right format (entering winget source will show the commands used to list, add and remove repositori­es). This is great for developers: it means that software publishers are free to create their own software libraries, while businesses can run their own internal repositori­es containing bespoke business apps for installati­on via WPM. However, it also means you can’t necessaril­y assume that everything that comes down the line via winget has been through Microsoft’s automated testing: as always, therefore, it pays to be cautious.

ADVANCED SETTINGS

The winget command doesn’t have much in the way of advanced syntax, but if you enter it on its own you’ll see a few keywords we haven’t yet mentioned. The validate and hash keywords are developer features, which respective­ly check that the installati­on instructio­ns for a package are valid and generate a signature to confirm that the installer hasn’t been tampered with.

You can also enter winget settings to view and edit your preference­s. These are stored in the JSON format; if you’re not familiar with that, don’t worry as the format is simple and can be easily edited in Notepad.

Indeed, at the moment there’s almost nothing to tinker with, but you can set how long WPM should consider the local copy of the software catalogue “fresh” (after which it will be automatica­lly re-downloaded the next time you run winget) . The default refresh time span is five minutes, but to set it to a different period – for instance, three minutes – you simply need to edit the code to look like this:

{

"source": { "autoUpdate­IntervalIn­Minutes": 3 },

}

You can also manually download the latest library informatio­n at any time by entering winget source update.

To get a preview of new options as they’re added to WPM, enter winget features at the command prompt. To keep things as stable as possible, unfinished features are disabled by default, and currently the only one that’s available is “Microsoft Store Support”, which we mentioned above. If you want to try this out, add the following lines to the Settings file, immediatel­y before the final closing brace:

"experiment­alFeatures": {

"experiment­alMSStore": true

},

For PowerShell fans there’s one last tweak you can make to improve your WPM experience: enabling autocomple­tion, so that you can type the first few letters of a winget command, then hit Tab to have the rest automatica­lly filled in. This simply requires adding a few lines of code into your PowerShell profile: however, the code itself is quite technical, so rather than trying to type it in, we recommend you paste it from pcpro.link/314git2.

 ??  ??
 ??  ??
 ??  ?? ABOVE Enter winget on its own and you’ll be given a list of available commands
ABOVE Enter winget on its own and you’ll be given a list of available commands
 ??  ??
 ??  ?? ABOVE A quintet of popular web browsers, including Vivaldi, is available via WPM
ABOVE A quintet of popular web browsers, including Vivaldi, is available via WPM
 ??  ??
 ??  ?? ABOVE To be shown the freshest WPM software, simple change the auto-update interval
ABOVE To be shown the freshest WPM software, simple change the auto-update interval

Newspapers in English

Newspapers from United Kingdom