Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7664645
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T14:21:29+00:00 2026-05-31T14:21:29+00:00

I want to read value from .ini file. Then write a condition – if

  • 0

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
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T14:21:31+00:00Added an answer on May 31, 2026 at 2:21 pm

    There are Pascal Script functions like GetIniInt or GetIniString you can use to read from an ini file. See this reference.

    I’d like to note that I wrote this reply before the OP changed his question to tell us he’d already tried the GetIniString and ReadIni functions. So yes: I did read the question before writing this answer 🙂

    From the code you’ve posted I can see you’re trying to read an ini file from the Program Files folder. This, however, only works when using the ExpandConstant function, so it should read

    a:=GetIniString('Select', 'First', 'false', ExpandConstant('{pf}') + '\SP_Settings.ini');
    b:=GetIniString('Select', 'Should', 'true', ExpandConstant('{pf}') + '\SP_Settings.ini');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to read an xml file, apply a transform, then write to another
I have an INI file that I want to read the line DeviceName=PHJ01444-MC35 from
I want to read/retrieve an Image from excel file to PHP using PHPExcel. This
In my grails application I want to read some values from properties file and
I want to read and write from serial using events/interrupts. Currently, I have it
I want to read line n1->n2 from file foo.c into the current buffer. I
I want to read a value from textfied in Java but I am not
I want to read an appSettings value from the c:\Program Files\Microsoft SQL Server\MSSQL.4\Reporting Services\ReportManager\Web.config
I want to read all cell value from excel sheet using Apache POI and
I want to read/extract the value from HSSFComment. I can access the HSSFComment by

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.