Skip to main content

INI Files

Create or modify INI files at install time.

PropertyTypeRequiredDescription
targetPathstringyesAbsolute path to the INI file on the install machine.
sectionsarray of MsiIniFileSectionyes (non-empty)INI sections to write.

MsiIniFileSection

PropertyTypeRequiredDescription
sectionstringyesINI section name (the [Section] header).
valuesarray of MsiIniFileValueyes (non-empty)Key-value pairs in this section.

MsiIniFileValue

PropertyTypeRequiredDefaultDescription
keystringyesINI entry key.
valuestringyesINI entry value. Supports [Property] substitution.
actionenumyesCreateOrUpdateOne of CreateOrUpdate, Create, CreateOrAppend.

Example

"msi": {
"iniFiles": [
{
"targetPath": "$.installDir\\config.ini",
"sections": [
{
"section": "General",
"values": [
{ "key": "version", "value": "1.0.0", "action": "CreateOrUpdate" },
{ "key": "telemetry", "value": "true", "action": "CreateOrUpdate" }
]
},
{
"section": "Endpoints",
"values": [
{ "key": "api", "value": "https://staging.api.MyCompany.example.com", "action": "CreateOrUpdate" }
]
}
]
}
]
}

CreateOrAppend is useful for list-style values where multiple installers contribute entries.