Skip to content

Support for extracting .7z and .rar archives natively for portable installers #6231

@PXStudio-developer

Description

@PXStudio-developer

Relevant area(s)

WinGet CLI

Description of the new feature / enhancement

Description of the Feature

Hey everyone!

Right now, winget works great with .zip files. But honestly, it's pretty frustrating that we still can't use .7z or .rar archives natively, especially for portable apps. Many open-source developers prefer .7z because the compression is just way better than standard zip.

Currently, if a program is distributed in .7z, package maintainers have to invent weird workarounds, write custom install scripts, or bundle extraction tools. It makes creating and maintaining manifests much harder than it should be.

Proposed Solution

It would be amazing if winget could extract .7z and .rar files out of the box, exactly the same way it currently handles .zip files.

Ideally, winget should just download the archive, unpack it to the portable apps directory, and set up the symlinks/shims automatically. No extra dependencies or custom scripts needed from our side.

Alternative Solutions Considered

  • We can force users to install 7-Zip first and use it as a dependency, but that completely ruins the seamless, headless installation experience.
  • Keep using custom scripts, but they are fragile and often break.

Additional Context

Since Windows 11 now natively supports opening .7z and .rar files in File Explorer (thanks to libarchive), it feels like a total no-brainer for winget to support them too.

Would love to hear your thoughts on this! Thanks for the awesome tool.

Proposed technical implementation details

Proposed technical implementation details

Since Windows 11 (Build 23493 and later) already integrates libarchive natively into the OS for File Explorer, the most logical approach would be to leverage the same capabilities:

  1. Leverage Windows Native libarchive:
    WinGet can utilize the built-in archiveint.dll or libarchive structures already present in modern Windows 11 versions to handle .7z (LZMA/LZMA2) and .rar (V5 format) decompression without bloat.

  2. Cross-Platform Fallback (vcpkg):
    For compatibility with older Windows 10/11 builds, the WinGet client can statically or dynamically link libarchive via vcpkg (which Microsoft already uses for dependency management).

  3. Manifest Schema Update:
    Extend the InstallerType enumeration in the WinGet manifest schema to recognize these archive types under the portable architecture. The client-side extractor logic just needs to route .7z and .rar extensions to the new libarchive wrapper, replicating the current ZipExtractor workflow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-FeatureThis is a feature request for the Windows Package Manager client.Resolution-DuplicateIssue is a duplicate
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions