Format:Inno Setup installer
| Developer | Jordan Russell / Martijn Laan |
|---|---|
| Magic | 'Inno' (49 6E 6E 6F) at file offset 0x30 in old stubs; offset table magic 'rDlPtS' + 4 bytes; 'Inno Setup Setup Data (x.y.z)' version string |
| Extensions | .exe, setup-N.bin |
| Endianness | little |
| License | Inno Setup License (modified BSD-style) |
| Website | https://jrsoftware.org/isinfo.php |
| On this wiki | Facts · Code · Notes · Topics |
Inno Setup setup.exe (and setup-1.bin slices): the SetupLdr offset table (Inno at 0x30 or resource 11111, rDlPtS magics), the 'Inno Setup Setup Data (x.y.z)' version string, CRC-checked header blocks (stored, zlib, LZMA1) and zlb-chunked file data (zlib, bzip2, LZMA1/2); as read from innoextract.
Layout of an Inno Setup installer as implemented by innoextract (zlib license), which reads versions 1.2.10 to 6.4.0.1. Everything in the Layout and Compression sections was read in the cited source files; sentences marked Unverified were not.
Layout
A setup.exe is a PE (Tool:Delphi) whose payload is appended or sits in an external setup-0.bin/setup-1.bin series. Three parts, found through the loader offset table:
- The embedded setup stub and messages are legacy parts (the table's
exe_offset,exe_uncompressed_size, and for versions before 4.0 amessage_offset). - The setup headers at
header_offset: a 64-byte version string, then two compressed block streams. The first holds the main header, languages, wizard images and the decompressor plugin (4.0.0+), the second the data (file location) entries. - The file data at
data_offset, or in the.binslices, aszlb\x1achunks.
Loader offset table (SetupLdr)
In versions before 5.1.5 the PE file holds the 4 bytes 49 6E 6E 6F ("Inno") at file offset 0x30, followed by a u32 offset of the table and the bitwise NOT of that u32; innoextract rejects the file when offset != ~not_offset. From 5.1.5 on the table sits in a PE resource with the numeric name 11111. When neither is found the file is treated as an external setup-0.bin whose headers start at offset 0.
The table begins with a 12-byte magic; innoextract knows these (earliest Inno version in brackets):
| Magic | Earliest version |
|---|---|
rDlPtS02 87 65 56 78 (rDlPtS02 then 87 'e' 'V' 'x') |
1.2.10 |
rDlPtS04 + same 4 bytes |
4.0.0 |
rDlPtS05 + same 4 bytes |
4.0.3 |
rDlPtS06 + same 4 bytes |
4.0.10 |
rDlPtS07 + same 4 bytes |
4.1.6 |
rDlPtS CD E6 D7 7B 0B 2A |
5.1.5 |
nS5W7dT 83 AA 1B 0F 6A |
5.1.5 |
Then, all little-endian u32 and all covered by a CRC-32 that starts with the magic: a revision (only from 5.1.5; 1 is expected), one dword innoextract ignores, exe_offset, exe_compressed_size (only before 4.1.6), exe_uncompressed_size, the setup stub checksum (Adler-32 before 4.0.3, CRC-32 from 4.0.3), message_offset (only before 4.0.0), header_offset, data_offset, and from 4.0.10 the table's own CRC-32.
Version string
At header_offset the 64-byte field holds the version, for example Inno Setup Setup Data (6.1.0) (u); the trailing (u) marks a Unicode build (UTF-16LE strings), and from 6.3.0 the marker (u) is no longer written, the version alone implies Unicode. Variants carry with ISX (x.y.z) or the prefix My Inno Setup Extensions Setup Data. Before 1.3.3 the marker is 12 bytes like i1.2.10--32 + 0x1A (--16 for the 16-bit build). innoextract lists every known string and treats an unknown string containing Inno Setup by parsing the first (a.b.c[a-z]) in brackets. Versions where the string alone is ambiguous (for example 5.5.7 (u) vs (U), and the unofficial 5.5.8) are marked in version.cpp.
Header blocks
Headers are read through a block reader. Each block starts with a CRC-32 of its own header fields.
- 4.0.9 and later:
u32 crc,u32 stored_size,u8 compressed. Compressed means LZMA1 from 4.1.6 and zlib for 4.0.9 to 4.1.5. - Before 4.0.9:
u32 crc,u32 compressed_size,u32 uncompressed_size; compressed_size 0xFFFFFFFF means stored (uncompressed), otherwise zlib. - The stored bytes are cut into 4096-byte sub-chunks, each preceded by a u32 CRC-32 of that chunk (the last chunk may be shorter). The decompressor reads the chunks and verifies each CRC before decompressing, so a damaged setup is detected early.
The main header then names the data compression: its compression enum is stored in the header, with different value tables per version: before 4.2.5 {zlib, bzip2, lzma1}; 4.2.5 {stored, bzip2, lzma1}; 4.2.6 to 5.3.8 {stored, zlib, bzip2, lzma1}; 5.3.9 onwards {stored, zlib, bzip2, lzma1, lzma2}. Before 4.1.5 no field exists and a flag bit selects bzip2 or zlib.
File data chunks
Every chunk begins with the 4 bytes 7A 6C 62 1A ("zlb" 0x1A) and is then compressed as one stream (zlib, bzip2, LZMA1 or LZMA2 according to the header). External slice files start with an 8-byte id, 69 64 73 6B 61 31 36 1A ("idska16" 0x1A) or idska32 + 0x1A. A chunk can be encrypted (XChaCha20) in recent versions; innoextract has code for it. File entries point into chunks by slice, offset and size.
Uninstaller
Unverified: the uninstaller unins000.exe and unins000.dat use the same family of structures with their own marker text (Inno Setup Messages, InUn), as the Tool page states from Detect It Easy rules; innoextract does not read them.
Code & repositories
- https://github.com/dscharrer/innoextract @
6e9e34ed0876014fdb46e684103ef8c3605e382e· license: Zlib (declared by the contributor for the files used; GitHub reports Zlib (read from LICENSE; GitHub's detector did not classify it) for the repository)
innoextract: extracts Inno Setup installers; src/loader/offsets.cpp reads the SetupLdr offset table, src/stream the block, chunk and slice formats, src/setup/version.cpp the known version strings.
Tested on: source read, not run · checked 2026-10-19; last activity 2025-02-06; Note: the latest release ships binaries; the wiki links only the source, never the binaries
See also
Tool:Inno Setup, Format:NSIS installer, Format:LZMA, Format:DEFLATE, Technique:Identifying the toolchain of a binary.