[INI] section

Inno Setup

[INI] section

This optional section defines any .INI file entries you would like Setup to set on the user's system.

Here is an example of an [INI] section:

[INI]
Filename: "MyProg.ini"; Section: "InstallSettings"; Flags: uninsdeletesection
Filename: "MyProg.ini"; Section: "InstallSettings"; Key: "InstallPath"; String: "{app}"

The following is a list of the supported parameters:

Filename  (Required)

The name of the .INI file you want Setup to modify, which can include constants. If this parameter does not include a path, it will write to the Windows directory. If this parameter is blank, it will write to WIN.INI in the Windows directory.

Example:
Filename: "{app}\MyProg.ini"
Section  (Required)

The name of the section in which to create the entry, which can include constants.

Example:
Section: "Settings"
Key

The name of the key to set, which can include constants. If this parameter is not specified or is blank, no key is created.

Example:
Key: "Version"
String

The value to assign to the key, which can use constants. If this parameter is not specified, no key is created.

Example:
String: "1.0"
Flags

This parameter is a set of extra options. Multiple options may be used by separating them by spaces. The following options are supported:

createkeyifdoesntexist

Assign to the key only if the key doesn't already exist in the file. If this flag is not specified, the key will be set regardless of whether it already existed.

uninsdeleteentry

Delete the entry when the program is uninstalled. This can be combined with the uninsdeletesectionifempty flag.

uninsdeletesection

When the program is uninstalled, delete the entire section in which the entry is located. It obviously wouldn't be a good idea to use this on a section that is used by Windows itself (like some of the sections in WIN.INI). You should only use this on sections private to your application.

uninsdeletesectionifempty

Same as uninsdeletesection, but deletes the section only if there are no keys left in it. This can be combined with the uninsdeleteentry flag.

Example:
Flags: uninsdeleteentry

Components and Tasks Parameters

Common Parameters