create self extracting archives         

how to create sfx archive

How to create Self Extracting Archives (SFX)

What are self-extracting archives?
How to create self-extracting 7Z or ARC files






SFX files definition

what are sfx files

Self-extracting archives (briefly referred as SFX files) are computer executable programs containing both an (usually compressed) archive of files and the routines needed to extract the content (SFX module), usually packed as Microsoft Windows EXE executable file.

what are self extracting archives

Use of SFX archives

WinRar, WinZip, 7-Zip, PeaZip, and other file archiver software are capable of creating self extracting archives, usually employing 7Z, RAR and ZIP compression for the archival part - learn more: what is a compressed archive file - and minimal sfx modules suitable for basic tasks of deployment of content as autonomous packages, not needing external  dedicated decompression software and capable of auto-unpacking themselves.

sfx files software

While an auto-extracting archive is potentially a simple, basic form of installer, most software for creation of installation packages extends the idea further providing formats capable of advanced scripting features to generate more complex and flexible autoextraction modules to unpack the content and perform other related operations, suc as conditional extraction of appropriate data, automatic output path detection, registration of shared files, interaction with registry etc.

SFX archives: advantages and disadvantages

Principle behind self extracting archives is providing the end user of the appropriate extraction executable instructions without the need of installing any software, which brings those advantages over non self extracting archives:
  • content and extraction tools are passed as atomic information
  • in order to extract the content, end user needs to run only a simple subset of instructions, through a minimal user interface requiring little or no feedback, rather than having to install and learn to operate a full general purpose archive manager software

Drawbacks of self extracting archives are:

  • being the extraction module embedded in the archive itself, it represents an overhead (usually some 10s or 100s of KB), which makes it a noticeable disadvantage in the case of small  archives
  • the sfx archive can be executed only on operating system platforms capable to run the sfx module - it can still be operated as a standard archive on other platforms, if suitable software is available
  • being the self extracting archive an executable file, some file sharing platforms - cloud service  providers, e-mail servers - may consider it a security risk and block the file, preventing it to reach the intended end users.

Max size of a self-extracting archive

On Windows platform .exe executables must be smaller than 2 GB (even PE and 64 bit Windows binaries).
Consequently, SFX format cannot be used to create a valid sfx archives larger than 2 GB.
A SFX file larger than 2 GB will still be readable as archive, suing an external archive manager tool - basically, it is plainly an archive with SFX executable module attached - but Windows will not be able to run the SFX module because the .exe file is larger than the maximum allowed size of 2 GB.

Add files to SFX archive in PeaZip

To create a SFX archive with PeaZip, select desired files and folders and click "Add" button for archive creation screen.
PeaZip can create self extracting 7Z files and, alternatively, self extracting archives in ARC format: supported SFX formats can be selected directly in archive format dropdown menu, simply selecting "Self-extracting 7Z" or "Self-extracting ARC" entries.
In "Advanced" tab of archive creation screen it is possible to select one of the available alternative SFX modules, which is the binary routine that will be embedded in the archive and which will handle the extraction of the content on recipient's machine without requiring external software.

how to create self extracting archives

Recipient will not need a suitable unarchiver application to open self-extracting files as the sfx module itself is autonomous for extraction of package content.
Please note, anyway, recipient will at least need the right to execute binary files (the sfx module) on the target system to proceed with (auto)extraction of the SFX archive.
Alternatively some archive managers, as PeaZip, can try to open arbitrary file types as archives (including most sfx packages) for custom content extraction without running the sfx module - which is recommended over running the files as binary if the source of the archive is unknown.

how to create sfx files

Encrypting a self extracting archive

To add a password to archive to prevent unauthorized decompression of the self-extracting archive, click on the padlock icon button "Enter password / keyfile" - also the encryption options are customizable in "Advanced" tab.
Please note that when a self-extracting archive is created, only the password (if provided) will be used for encrypting the data, and only the password will be needed to extract & decrypt it, this because available SFX modules does not support two factor authentication and would be unable to parse the keyfile, failing decryption.

Custom SFX modules

Custom sfx modules with different sets of features and user interaction interfaces are available in PeaZip add-ons section Custom SFX modules.

Read more: Self-extracting archivessfx module Wikipedia page

Synopsis: What are self extracting archives, what are advantages and disadvantages in using sfx files. Create sfx files with PeaZip free archiver software. How to create self extracting archives, and work with sfx archives.

Topics: sfx self extractiong archives

PeaZip > FAQ > How to create Self Extracting Archives (SFX)

sfx self extracting archivesARCHIVE MANAGER

Archive formats limitations

Comparison of compression algorithms and archive formats

How file compression (lossy, lossless) and archiving works?

How to add files and folders to a new archive

How to add new files to existing archive

How to add files to multiple separate archives

How to delete files from archive

How to convert existing archives

How to edit files in archive

How to extract multiple archives at once

How to extract selected content from archive

How to open, list, browse, and search archive file

How to update existing archives

How to improve file compression performances

Self extracting archives

What is solid compression?

Why some types of files cannot be compressed?

create self extracting archives
how to work with sfx files
All PeaZip downloads
PeaZip for Linux
PeaZip for macOS
PeaZip for Windows
PeaZip sources
how to use self extracting archives
how to use sfx files
Online help
Frequently Asked Questions

peazip file compression software
peazip free archiver utility
PeaZip project: TOS, Privacy
Releases Feed SFX archives: advantages and disadvantages
PeaZip Wiki SFX files autonomous compressed files capable of auto-extraction without requiring external software
Developer email what is a sfx file
Search knowledge-base
what is a self extracting archive