I use the following code in a section [code]to get a string from an INI file (in the example: [InstallSettings] section, variable name: DefDirName):
[code]
function GetDefDirName(Param: String): String;
begin
Result := GetIniString('InstallSettings', 'DefDirName', '', 'c:\your_app_dir\file_with_info.ini'));
end;
and at the very top of the script section in [Setup]:
DefaultDirName={code:GetDefDirName}
source
share