Iexpress

From wikinotes

iexpress is a builtin windows utility to create self-extracting archives.

Create .exe

WARNING:

iexpress requires that every file has a unique filename.

I started embedding zipfiles within the archive, and using .bat files to extract/run the desired program

WARNING:

CAB files have a maximum size, I believe around 1GB.


Create a .sed file that contains build-instructions for .exe.

[Version]
Class=IEXPRESS
SEDVersion=3
[Options]
PackagePurpose=InstallApp
ShowInstallProgramWindow=0
HideExtractAnimation=0
UseLongFileName=0
InsideCompressed=0
CAB_FixedSize=0
CAB_ResvCodeSigning=0
RebootMode=I
InstallPrompt=%InstallPrompt%
DisplayLicense=%DisplayLicense%
FinishMessage=%FinishMessage%
TargetName=%TargetName%
FriendlyName=%FriendlyName%
AppLaunched=%AppLaunched%
PostInstallCmd=%PostInstallCmd%
AdminQuietInstCmd=%AdminQuietInstCmd%
UserQuietInstCmd=%UserQuietInstCmd%
SourceFiles=SourceFiles
[Strings]
InstallPrompt=
DisplayLicense=
FinishMessage=
TargetName=C:\temp\installer.exe   # path executable being built
FriendlyName=My Program Installer  # installer-name
AppLaunched=cmd /c run.bat         # run-command
PostInstallCmd=<None>
AdminQuietInstCmd=
UserQuietInstCmd=
FILE0="run.bat"                    # (each) file to be included in archive
FILE1="file.zip"
[SourceFiles]
SourceFiles0=C:\temp\my\directory  # (each) directory on-disk that files are obtained from
[SourceFiles0]                     # heading for each directory, and list of it's files
%FILE0%=
%FILE1%=

Build the exe file

iexpress.exe /N build_instructions.sed

Extract .exe

Paste the path to the .exe file into 7zip.