Expand description
Inno is a read-only parser for Inno Setup installers (.exe). It reads the installer structures so you can inspect an installer without actually running it.
This crate focuses on correctness across a wide range of Inno Setup versions and provides strongly-typed access to sections like Languages, Files, Tasks, Components, Registry entries, and more. It does not execute any installer logic.
§Getting started
Add this to your Cargo.toml:
[dependencies]
inno = "0.2"Then, open an installer and inspect its contents:
use std::fs::File;
use inno::Inno;
fn main() -> Result<(), inno::error::InnoError> {
let file = File::open("path/to/setup.exe")?;
let inno = Inno::new(file)?;
println!("Inno Setup version: {}", inno.version());
if let Some(name) = inno.header.app_name() {
println!("App name: {name}");
}
println!("Languages ({}):", inno.languages().len());
for lang in inno.languages() {
println!("- {}", lang.name());
}
Ok(())
}§Optional Features
The following are a list of Cargo features that can be enabled or disabled:
- chrono: Enables converting a file’s created at time to a
DateTime<UTC>. - jiff: Enables converting a file’s created at time to a
Timestamp.
§What this crate provides
- A high-level
Innostruct representing a parsed installer, including:Inno::version: the detected installer version and variant (Unicode/ANSI, ISX, etc.).Inno::header: top-level metadata and configuration (app name, publisher, compression, wizard settings, etc.).- Collections for languages, messages, permissions, types, components, tasks, directories, files, icons, INI entries, registry entries, and run entries.
Inno::file_locations: low-level data/file location entries for consumers that want to implement extraction.
- Safe decoding of text according to the installer’s Unicode/ANSI mode and language codepage.
- Version-aware parsing that accounts for structural changes between Inno Setup releases.
This crate does not extract files by itself, but it exposes enough information
(e.g., file locations, checksums, compression type) for downstream tools to do so.
See the innex CLI in this repository for a reference consumer.
§Supported versions
Parsing is supported up to Inno Setup 6.6.x. Newer installers may work but can introduce format
changes. In that case, you will get InnoError::UnsupportedVersion.
§Features
-
LZMA/BZip2/Deflate detection through header metadata.
-
Optional static LZMA linking via the
lzma-staticfeature for consumers that need it:[dependencies] inno = { version = "0.2", features = ["lzma-static"] }
§Error handling
All fallible operations return InnoError. Typical errors include:
- Not an Inno installer file.
- Unsupported (too-new) installer version.
- I/O errors while reading.
- Unexpected data at the end of a header stream (corruption or truncated file).
§Notes on text decoding
In Unicode installers, text is always read as UTF-16LE. In ANSI installers, this crate picks a codepage based on the language table, preferring Windows-1252 when no explicit match is found, to maximize compatibility with older installers.
§Minimum Supported Rust Version (MSRV)
This crate is tested with Rust 1.88 or newer. Newer Rust versions are generally recommended.
§Acknowledgements
- innoextract: https://github.com/dscharrer/innoextract
- Inno Setup: https://jrsoftware.org/isinfo.php