Reads a value from an INI file and stores it in a variable.
Action ID: 13
Action Category:
INI Files
The name of the variable to store the result in.
The default value to assign the variable if the INI file, section or value name does not exist or cannot be read.
The name of the INI file.
The INI file section to read from.
The name of the INI file value to read from the section.
Value |
Simple Message |
Verbose Message |
0 (OK) |
|
|
1 |
Could not read from INI file. |
File not found. |
2 |
Could not read from INI file. |
Could not read value. |
In this example, we will read a user's name from a private INI file in the user's Windows directory called "info.ini" that was put there by a previous installation. The data is in the section called "UserData", in the "UserName" value.
We will store this information in a custom variable named %UserName%.
Note: %WinDir% is a built-in variable.
Variable name: %UserName%
Default value: Unknown User
File name: %WinDir%\info.ini
Section: UserData
Value name: UserName
See Also: Alphabetical List of Actions, Categorical List of Actions, On Error tab