我想从.ini文件中读取值.然后写一个条件 - 如果这个值等于"1",那么做某事(执行一个动作).我尝试了getinistring,但我没有得到任何值(只显示默认值).我不知道如何在我下面的代码中实现readini.感谢您的帮助,IS初学者:)
//编辑这是一个代码:
#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'); …Run Code Online (Sandbox Code Playgroud)