Skip to content

Write a value to an .ini file

This custom action replaces the keys and values under the specified section in an initialization file. Although you should use registry to store application settings, some applications may still work with .ini files.

Format of an INI file:

Property Name Data Type Description
AddUninstRef Boolean Indicates whether the uninstaller will remove the entry added to the .ini file by this custom action.
AppName String Specifies the section containing the key name. This section name is typically the name of the calling application. Do not add the enclosing brackets [ ] yourself.
IniFile String Points to a string that names the initialization file. Do not forget the .ini extension and its path. Example: %WIN%\Myappli.ini
Key String Contains the name of the key to be associated with a string.
Value String Points to a string to be written to the .ini file. You can of course use variables.

If your application uses a non-common .ini file (common .ini are win.ini for example), then you should add a reference to the uninstaller manually; so the uninstaller will remove the entire .ini file and not only its entries.

Tip: if you want to create a new .ini with some pre-defined entries, you can have a look at the custom action titled "Write text (or variables) to a file".

All available actions