This tool takes a folder with application and packs it into a single executable file (without compression) for easy distribution, portability or whatnot.
It depends on Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package for changing the name of packed application. It will work without VC 2005 Runtime but package name will be "Appacker package".
Appacker and packages created by it can be detected as malware by some antivirus software. That's because of a hacky way i used to package files: packed app reads its own executable and extracts other files from it, which antiviruses find hella suspicious. It's false positive, but it still gets in the way of using this app. I can't fix this, which renders this app not very useful. ¯\_(ツ)_/¯
Still want to download it for some reason? Well, here you go then: Download the latest version.
To pack an application you have to:
.exe
file)..exe
into the second textBox; in this case it will be replaced by the package.self-repackable
checkbox.Pack!
button and it's done. It may take some time if the target application is big enough / has a lot of files.
It can be used in GUI-less mode via command line. If you provide no arguments it will launch GUI.
Usage: appacker.exe [-r] [-q] <-s "source_folder"> <-e "main_exe"> [-d "save_location"] [-i "icon_path"]
Options:
-s, --src, --source-folder=VALUE
Directory containing all the files of the target
application.
-e, --exe, --main-exe=VALUE
Local path to the main executable inside the
source app folder. This is the application that
will launch whenever the packed app extracts
itself.
-d, --dst, --destination, --output=VALUE
Location where packed app will be created.
-i, --ico, --icon=VALUE Custom icon for the packed application.
-r, --repack, --self-repack
Sets the packed application to refresh itself
after the main executable closes. Refreshing
adds and replaces files in the packed executable
with those created and modified during runtime.
-q, --quiet, --silent No progress messages will be shown during the
packing process.
-h, --help, -? Show this message and exit.
This will launch Appacker in GUI mode:
C:\>appacker.exe
This will launch Appacker in console mode:
C:\>appacker.exe -r -src "d:\users\sergreen\desktop\vault\coolapp" -exe "bin\launcher.exe" -dst "d:\users\sergreen\desktop\vault\CoolApp packed.exe" -ico "d:\cool_icon.png"
You can also run it in silent mode by adding --quiet
flag, in this mode only error messages are shown.
The principle behind Appacker is that you can write whatever you want to the end of an .exe
file and it will still work fine.
This app simply appends all the necessary files to the end of a wrapper executable and when the wrapper is launched, it extracts all the files from its own .exe
, places them into a temporary folder and starts extracted application. When target app is closed, wrapper removes temp folder.
Also you can set self-repack flag and Appacker will append to the wrapper executable the packer tool, that will repack target application once it's closed from the temporary folder and replace the original package with the updated one. This can be used to create portable application that can keep any changes made to its files (like settings, that are stored inside application directory).
Packed application is in fact an unpacker.exe
with appended files. Application's lifecycle differs a bit for self-repackable and regular packages.
For the example, let's take the CoolApp.exe
package from the screenshot above and see what it does when launched.
If it's NOT a self-repacking application, CoolApp.exe does the following:
C:\Users\%UserName%\AppData\Local\Temp
exe
into the temp folderCoolApp.exe
it's Launcher.exe
) and waits for it to finishIf it is a self-repacking application, CoolApp.exe does the following:
C:\Users\%UserName%\AppData\Local\Temp
packer.exe
and unpacker.exe
toolspacker.exe
and unpacker.exe
from its own exe
into the temp folder Bexe
into the temp folder ACoolApp.exe
it's Launcher.exe
) and waits for it to finishpacker.exe
from temp folder B and quitsCoolApp.exe
CoolApp.exe
with the special flag -killme
and asks it to delete the temp folder B (because packer.exe
can't delete itself); packer quitsCoolApp.exe
deletes temp folder B and quitsAppacker
— WinForms main application projectPacker
— Console tool that creates packagesUnpacker
— Console wrapper that is used as the core of a packageProgressBarSplash
— WinForms splashscreen tool, that is used by packer and unpacker toolsIconLib
— DLL project for saving Windows .ico
files (vanilla .NET can't save Windows icons correctly ¯\_(ツ)_/¯ )IconInjector
— DLL project for replacing icons of external executables.ico
images.