Jump to content
Microsoft Windows Bulletin Board

Windows Package Manager 1.4


Recommended Posts

Guest Demitrius Nelon
Posted

The Windows Package Manager team has been busy working on WinGet 1.4. This release introduces support for .zip-based packages. WinGet can now extract and run an installer inside of a .zip archive or install one or more portable packages from an archive. The WinGet open-source community has also been busy adding new features like command aliases to help with muscle memory if you use more than one package manager, and a wait argument to keep winget.exe open long enough to see what’s happening if it’s called from other applications.

 

winget1.4.thumb.png.2e97432afa5e9a0976b8e0e9ffc77ff3.png

 

[HEADING=1]WinGet Show Improvements[/HEADING]

 

A few more manifest values like tags and purchase URL were added to the output (if they are present) of [iCODE]winget show <package>[/iCODE]. Below I have an example running [iCODE]winget show oh-my-posh -s winget[/iCODE]. Since Oh My Posh is available both in the Microsoft Store and the Windows Package Manager community repository, I narrowed the results down to the “winget” source. If you like the colorful display in my prompt, that’s the prompt theme engine I’m using.

 

show.oh-my-posh.thumb.png.1c9263600af857bc28e7fc12dfb48b6a.png

 

[HEADING=1]Command Aliases[/HEADING]

 

Muscle memory can be hard to overcome. If you’ve ever tried to type “dir” on a Linux system or “ls” on Windows, you know what I mean. Several new command aliases have been added to WinGet that might help a little. When you run [iCODE]winget[/iCODE] with no arguments, the default help displays the available commands. If you drill in a bit running [iCODE]winget <command> --help[/iCODE] you will see if any aliases are available. Below, you can see “find” is an alias for “search”. Other command aliases include [iCODE]add[/iCODE] for install, [iCODE]update[/iCODE] for upgrade, [iCODE]remove[/iCODE] and [iCODE]rm[/iCODE] for uninstall, [iCODE]ls[/iCODE] for list, and [iCODE]config[/iCODE] for settings.

 

winget.search.help_.thumb.png.1352ae952140d4b198a3494e57c4df8e.png

 

As you might expect, you can now run [iCODE]winget find vscode[/iCODE] and the same output is displayed as if you had run [iCODE]winget search vscode[/iCODE].

 

winget.find_.vscode.thumb.png.bebb0419ceb29fdc5df0a234ad1cd125.png

 

Note: The results displayed when searching the Windows Package Manager Community repository are ordered by a “best match” heuristic. WinGet evaluates the name, identifier, moniker, and tags. They are also more inclusive than “show” where WinGet is trying to find a single best match to use for install.

 

[HEADING=1]Install / Upgrade Flow Enhancements[/HEADING]

 

Some packages require an explicit argument to be passed in order to perform an upgrade. This was causing winget to fail if a user ran [iCODE]winget install <package>[/iCODE] and the package was already installed on the machine. We made some additional enhancements to detect that the package was already installed and switch to the upgrade flow. If you don’t want the upgrade, you can pass [iCODE]--no-upgrade[/iCODE]. This is most commonly encountered in scritped scenarios. We’ve also noticed several packages can upgrade themselves, so our default behavior is to allow them to do so. If you run [iCODE]winget upgrade --all[/iCODE] and one or more of these packages are encountered, they will be skipped. If you want to include them, just add [iCODE]--include-explicit[/iCODE].

 

[HEADING=1].zip Archive[/HEADING]

 

WinGet now supports installing packages contained within a .zip archive. This feature builds on the existing support for portable packages, and existing installer support for MSIX, MSI, and EXE-based installers. Our initial support includes either a single installer, or (one or more) portable package(s). We’ve kept the Issues and PRs (Pull Requests) open at GitHub and added the “.zip” label to them. Once this release rolls out to the majority of supported Windows systems, we will begin validating the existing PRs and accepting new ones.

 

[HEADING=1]Wait[/HEADING]

 

Wait, there’s more. (I couldn’t help myself) Sometimes when you’re scripting things, or debugging, you want a prompt. It can be quite frustrating to see a terminal window display some text and then disappear before you can read everything. Just add [iCODE]--wait[/iCODE].

 

winget.upgrade.wait_.thumb.png.a9b852720ac524f739a67769078c4383.png

 

The post Windows Package Manager 1.4 appeared first on Windows Command Line.

 

Continue reading...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...