Using winget
to install programs with large archives (e.g., zig.zig
) takes a long time and appears to hang:
PS> winget install zig.zig
Found Zig [zig.zig] Version 0.14.0
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Successfully verified installer hash
Extracting archive...
Create or update settings.json
to set installBehavior.archiveExtractionMethod
to tar
:
{
"$schema": "https://aka.ms/winget-settings.schema.json",
"installBehavior": {
"archiveExtractionMethod": "tar"
}
}
This file is probably located at %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
.
By default, winget
uses the ancient and slow zipfldr.dll
to extract archives.
Since 2017, Windows comes with tar.exe
which is faster. So, switching archive extraction method resolves the problem.
Original issues for reporting the problem: #3306, #3311, #3505
PR #4541 for adding suppport for using tar.exe
(Documentation: Archive Extraction Method)