INO File Documentation


Summary

An .ino file named as an Inno Setup script is a plain-text installer script that tells the Inno Setup compiler how to build a Windows setup program: which files to install, where, and what registry entries and shortcuts to create. It is an INI-style text file with a Pascal scripting section, so any text editor opens it. Note that Inno Setup’s own scripts actually use the .iss extension, and today a .ino file is far more often an Arduino sketch.

Technical details

FeatureValue
Full name (this site)Inno Setup script file
File extension.ino (Inno Setup’s own scripts use .iss)
MIME typetext/plain
Format typePlain-text installer script (INI-style sections + Pascal code)
Character encodingANSI or UTF-8 (Unicode scripts must be UTF-8)
CompilerInno Setup Compiler (ISCC.exe / the IDE)
DeveloperJordan Russell (JR Software)
IntroducedInno Setup, first released 1997
OutputA single Windows Setup.exe installer
Scripting languagePascal Script (in the [Code] section)
Preprocessor#include (built-in) or ISPP (#define, #if, macros)
Comment syntaxSemicolon ; at the start of a line
Open standardNo — proprietary tool format, but the tool is free
Magic numberNone — plain text; identify by [Setup] / [Files] headers
Common sections[Setup], [Files], [Icons], [Registry], [Run], [Code]
Related extensions.iss, .isl, .ispp, .exe
Note (other meaning).ino is most commonly an Arduino sketch (C++ source)
Specification / docsjrsoftware.org/ishelp/
Structure at a glance

An Inno Setup script is plain text with no file signature. Entries are grouped into sections written like an INI file: a header in square brackets, for example [Setup] or [Files], followed by one entry per line. Two kinds of section exist. Directive sections such as [Setup] use Directive=Value pairs (AppName=My App). Parameter sections such as [Files] use named parameters separated by colons (Source: "app.exe"; DestDir: "{app}"). A leading semicolon ; marks a comment. The optional [Code] section holds Pascal Script for custom install logic. Identify the file by its bracketed section headers, not by any header bytes.

What is an INO file?

On this site an .ino file is catalogued as an Inno Setup script: the source text that the Inno Setup compiler reads to build a Windows installer. Inno Setup is a free installer builder written by Jordan Russell, first released in 1997 and still widely used. The script is an ordinary text file. You edit it, then compile it, and the compiler produces a single self-contained Setup.exe that copies your program’s files onto a user’s machine, writes registry keys, creates Start-menu shortcuts and registers an uninstaller.

One point matters before anything else. Inno Setup’s own scripts use the extension .iss, not .ino; the .ino/Inno pairing is a historical mislabel that persists in some extension databases. Separately, on a modern machine a file ending in .ino is far more likely to be an Arduino sketch — C++ source code for an Arduino microcontroller, opened in the Arduino IDE. If your .ino contains setup() and loop() functions and #include lines, it is an Arduino sketch, not an installer script. The rest of this page describes the Inno Setup script format as named, and returns to the Arduino case at the end.

INI-style sections: how the script is organised

An Inno Setup script is laid out like an INI file. Content is grouped into sections, each introduced by a header in square brackets, and each section holds one entry per line. A parser (and the compiler) reads the file top to bottom, switching context every time it meets a new [Header]. Blank lines are ignored and a line beginning with a semicolon ; is a comment.

; ---- a minimal Inno Setup script ----
[Setup]
AppName=My Program
AppVersion=1.5
DefaultDirName={autopf}\My Program
OutputBaseFilename=MyProgram-Setup

[Files]
Source: "MyProg.exe";  DestDir: "{app}"; Flags: ignoreversion
Source: "readme.txt";  DestDir: "{app}"; Flags: isreadme

[Icons]
Name: "{autoprograms}\My Program"; Filename: "{app}\MyProg.exe"

[Run]
Filename: "{app}\MyProg.exe"; Description: "Launch"; Flags: postinstall nowait

Every section has a defined job. [Setup] holds installer-wide settings. [Files] lists the payload to install. [Icons] defines shortcuts, [Registry] writes registry values, [Run] executes programs at the end of setup, and [UninstallDelete] removes extra files during uninstall. Other sections include [Types] and [Components] for selectable install options, [Tasks] for optional checkboxes such as “create a desktop icon”, [Dirs], [INI], [Languages] and [Messages].

Directive sections versus parameter sections

The sections split into two grammars, and mixing them up is the commonest scripting mistake. Directive sections, of which [Setup] is the main one, take simple Directive=Value lines: AppName=My Program. Parameter sections, such as [Files], [Icons], [Registry] and [Run], take a list of named parameters on each line. A parameter is a name, a colon, then a value, and parameters are separated by semicolons: Source: "MyProg.exe"; DestDir: "{app}"; Flags: ignoreversion. Within a value, a doubled quote escapes a literal quote, and text in braces is a constant (see below).

Constants: the {app}, {autopf} and {sys} placeholders

Values in braces are constants that Inno Setup resolves at install time on the target machine, so a script never hard-codes a path. {app} is the application directory the user chose; {autopf} expands to the correct Program Files folder (32- or 64-bit) for the current install mode; {autoprograms} is the Start-menu Programs folder; {sys} is the Windows system directory; {tmp} is a temporary folder cleaned up after setup; {userdesktop} is the desktop. Because these expand per machine, the same compiled installer places files correctly on any supported Windows version. A literal brace is written by doubling it: {{ produces one {.

The [Code] section: Pascal Script event functions

Static sections cover most installers, but custom logic lives in the [Code] section, which contains Pascal Script — a Pascal dialect interpreted by Inno Setup at run time. Code here defines event functions with reserved names that the installer calls at defined moments. InitializeSetup runs before the wizard appears and can abort the install by returning False; NextButtonClick validates a wizard page; CurStepChanged fires as installation moves through its steps; InitializeWizard builds custom wizard pages.

[Code]
function InitializeSetup(): Boolean;
begin
  if not RegKeyExists(HKLM, 'SOFTWARE\Microsoft\.NETFramework') then
  begin
    MsgBox('.NET is required.', mbError, MB_OK);
    Result := False;   // abort the install
  end
  else
    Result := True;
end;

The scripting engine exposes support functions such as MsgBox, RegKeyExists, FileExists and Exec, so a script can check prerequisites, read the registry, or run helper programs. This is how an installer performs conditional installs, version checks and other decisions that a flat parameter list cannot express.

The preprocessor: #include, #define and ISPP

Lines beginning with # are handled by a preprocessor before the compiler sees the script. The built-in preprocessor supports only #include, which pulls in another file. The optional Inno Setup Preprocessor (ISPP) adds much more: #define for macros and constants, #if / #else conditionals, and inline expressions such as {#MyAppVersion}. A #preproc directive on the first line selects which preprocessor to use, and by default a script uses ISPP if it is available. Unicode scripts that use non-ASCII characters must be saved as UTF-8 so the compiler decodes them correctly.

#define MyAppName "My Program"
#define MyAppVersion "1.5"

[Setup]
AppName={#MyAppName}
AppVersion={#MyAppVersion}
OutputBaseFilename={#MyAppName}-{#MyAppVersion}-Setup

Compilation: from script to Setup.exe

The script is not the installer; it is the recipe. The Inno Setup Compiler (the IDE, or the command-line ISCC.exe) reads the script, gathers every file named in [Files], compiles the Pascal Script, compresses the payload (LZMA or LZMA2 by default) and writes one Setup.exe. That executable embeds the compressed files plus the wizard engine, so it runs on a target machine with nothing else installed. Editing the script has no effect until it is recompiled; the shipped .exe is a frozen snapshot of the script and its payload at build time.

If your .ino is actually an Arduino sketch

Because the Inno Setup association is largely historical, most people who reach a .ino file today have an Arduino sketch: plain-text C++ source for an Arduino or compatible microcontroller board. An Arduino sketch defines a setup() function that runs once and a loop() that runs forever, and the file must live in a folder with the same name (blink.ino inside a blink folder). You open, compile and upload it with the free Arduino IDE, the browser-based Arduino Cloud Editor, or Visual Studio Code with the PlatformIO extension. Any text editor will display the code. If the file you are holding reads as C++ with pinMode and digitalWrite calls, it is a sketch, and the Inno Setup material above does not apply. See the related installer-script format at ISS for genuine Inno Setup scripts.

References