Replace text in INI file...

24 views
Skip to first unread message

Helgatun Fjellpensjonat

unread,
Dec 3, 2025, 3:45:23 PM12/3/25
to innosetup
Hi,

I have an INI file which needs to be populated from my installer.  It has the following format:

[aliases]
MyAlias=C:\SomeFolder

[licenses]
MyLicenses=C:\SomeLicenses

How can I use something like ReplaceLineInFile() where I locate the bracketed keywords as 'anchor' and edit its following line.

Thanks a lot for help on this

regards Tor

Jernej Simončič

unread,
Dec 3, 2025, 4:11:27 PM12/3/25
to Helgatun Fjellpensjonat on [innosetup]

On Wednesday, December 3, 2025, 21:45:21, Helgatun Fjellpensjonat wrote:


How can I use something like ReplaceLineInFile() where I locate the bracketed keywords as 'anchor' and edit its following line.

Inno has native support for INI files, either through [INI] section, or through [Code] (search for INI File functions).

 

-- 
< Jernej Simončič ><><><><>< https://eternallybored.org/ >


When you've got them by the balls, their hearts and minds will follow.
       -- Colson's Law
Reply all
Reply to author
Forward
0 new messages