SelF eXtract Maker for Windows.
β
Tested on Windows 10 / Visual Studio 2013 (Minimum build WindowsXP)
WinSFXMaker is a very super simple install-sheild GUI tool for creating self-extracting (SFX) executables on Windows. It allows users to bundle ZIP archives into standalone .exe files that automatically extract and optionally run an installer or other program.
- β Easy-to-use SFX archive generator
- β Custom post-extraction command support
- β Lightweight and dependency-free portable exe binary.
- β Intuitive GUI with file pickers
- β ZIP file bundling into a Windows EXE
- β Custom post-extraction execution (e.g., launch installer.exe)
- β Logging support via log4cpp
- β
Resource management using
SFXTemplateandres/
- Platform: Windows (32-bit / 64-bit)
- Language: C+ +ISO 14 with MFC and GDI+
- Visual Studio 2013 (v120 toolset)
- MFC (Microsoft Foundation Classes)
- Windows SDK
/
βββ Dialog/ # Dialog UI logic
βββ Helper/ # Utility functions
βββ SFXTemplate/ # Template EXE and metadata
βββ UI/ # Icons and GUI resources
βββ ZipArchive/ # ZIP compression/decompression (minizip-based)
βββ log4cpp/ # Integrated log4cpp source
βββ res/ # Resource files (icons, templates, etc.)
βββ WinSFXMaker.* # Core application logic
βββ README.md # Project documentation
-
Clone the repository:
git clone https://github.com/ahnshy/WinSFXMaker.git cd WinSFXMaker -
Open the solution:
- Launch
WinSFXMaker.slnin Visual Studio 2013 or later
- Launch
-
Choose build config:
- Select
ReleaseorDebugmode - Choose x64 or Win32 platform
- Select
-
Build:
- Build
ALL_BUILDor theWinSFXMakertarget
- Build
- Launch
WinSFXMaker.exe - Select the input ZIP file (e.g.,
setup.zip) - Specify output EXE file name (e.g.,
installer.exe) - Enter post-extraction command (e.g.,
setup.exe) - Click "Create SFX" to generate a standalone installer
You can generate SFX files without the GUI by using command-line arguments.
WinSFXMaker.exe [options]| Option | Description |
|---|---|
-p, --path <path> |
Folder path to compress (required) |
-o, --output <file> |
Output SFX file path (auto-generated if omitted) |
-i, --icon <file> |
Icon file (.ico) |
-r, --run <file> |
File to run after extraction (relative or absolute path) |
-v, --version <version> |
Version string (e.g., "1.0.0.0") |
-n, --name <name> |
Product name |
-c, --copyright <text> |
Copyright info |
-d, --description <text> |
File description |
-s, --silent |
Run with no console output (Silent mode) |
-h, --help |
Show help |
WinSFXMaker.exe -p "C:\MyApp"Compresses C:\MyApp and creates C:\MyApp\MyApp.exe
WinSFXMaker.exe -p "C:\MyApp" -o "C:\Output\Setup.exe"WinSFXMaker.exe -p "C:\MyApp" -r "MyApp.exe"Automatically runs MyApp.exe after extracting
WinSFXMaker.exe -p "C:\MyApp" -r "bin\Release\MyApp.exe"Automatically runs bin\Release\MyApp.exe after extracting
WinSFXMaker.exe -p "C:\MyApp" -r "C:\MyApp\bin\Release\MyApp.exe"The run target is automatically stored as a relative path (bin\Release\MyApp.exe) when possible
WinSFXMaker.exe -p "C:\MyApp" -o "C:\Output\Setup.exe" -i "app.ico" -r "Setup.exe" -v "1.0.0.0" -n "My Application" -c "Copyright 2024" -d "My App Installer"WinSFXMaker.exe -p "C:\MyApp" -r "Setup.exe" -sRuns without console output
WinSFXMaker.exe --helpWinSFXMaker - CLI Mode
======================
Input Path: C:\MyApp
Output File: C:\MyApp\MyApp.exe
Icon: C:\icons\app.ico
Run After: Setup.exe
Compressing files...
Preparing template...
Applying icon...
Applying version info...
Creating SFX file...
SFX file created successfully!
Output: C:\MyApp\MyApp.exe
Internal structure of the generated SFX file:
[EXE Template] + [ZIP Data] + [ZIP Size (8 bytes)] + [Run-File Info (optional)]
If run-file info exists:
[EXE Template] + [ZIP Data] + [ZIP Size (8 bytes)] + [RUNA Marker (4 bytes)] + [Path Length (4 bytes)] + [Path String] + [END! Marker (4 bytes)]
When the program runs, it creates a log file next to the executable.
WinSFXMaker.exeβWinSFXMaker.logMySetup.exe(generated SFX) βMySetup.log
[2024-12-25 12:34:56.789] [INFO] === WinSFXMaker Started ===
[2024-12-25 12:34:57.123] [INFO] Selected input path: C:\MyApp
[2024-12-25 12:34:58.456] [INFO] Create SFX button clicked
[2024-12-25 12:34:59.789] [INFO] SFX file created successfully: C:\Output\Setup.exe
- Ensure your post-extraction executable exists inside the ZIP archive
- Some commands may require elevated privileges (UAC prompt)
- You can customize the icon and stub using the
res/folder
-
Product Design and Developed by
ahnshy -
Built with:
- Microsoft Win32 / MFC & GDI+
- log4cpp for logging
- minizip for archive management
-
Inspired by traditional SFX packaging workflows
This project includes components like log4cpp and minizip, which are licensed under their respective open-source licenses.
Please verify usage rights before redistribution.
log4cpp LGPL 2.1 (Lesser General Public License v2.1)
minizip zlib/libpng License