I want to read value from .ini file. Then write a condition - if this value equals "1", then do sth(perform an action). I tried getinistring, but I it didn't get any values(just display default value). And I don't know how to implement readini in my code attached below. Thanks for any help, IS Beginner :)
//edit Here is a code:
#include ReadReg(HKEY_LOCAL_MACHINE,'Software\Sherlock Software\InnoTools\Downloader','ScriptPath','');
#include ReadReg(HKEY_LOCAL_MACHINE,'Software\Sherlock Software\InnoTools\Tray','ScriptPath','');
[Languages]
Name: english; MessagesFile: compiler:Default.isl
[Code]
function isxdl_Download(hWnd: Integer; URL, Filename: AnsiString): Integer;
external 'isxdl_Download@files:isxdl.dll stdcall';
function isxdl_SetOption(Option, Value: AnsiString): Integer;
external 'isxdl_SetOption@files:isxdl.dll stdcall';
var
a :string;
b :string;
//Downloading a component depending on component choice in another setup(read from .ini)
procedure CurStepChanged(CurStep: TSetupStep);
begin
a:=GetIniString('Select', 'First', 'false', '{pf}/SP_Settings.ini');
b:=GetIniString('Select', 'Should', 'true', {pf}\SP_Settings.ini');
begin
if CompareStr(a,b)=0 then
if CurStep=ssInstall then begin
isxdl_SetOption('title', 'File Download');
isxdl_SetOption('label', 'Download');
isxdl_SetOption('description', 'Setup is downloading a file.');
isxdl_Download(0,'url', ExpandConstant('{app}\x.rar'));
end;
end;
end;
[Files]
Source: C:\Documents and Settings\user\Pulpit\XML\Project\isxdl.dll; DestDir: {tmp}; Flags: dontcopy