Replace text in INI file...

20 views
Skip to first unread message

Helgatun Fjellpensjonat

unread,
Dec 3, 2025, 3:45:23 PM (5 days ago) Dec 3
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 PM (4 days ago) Dec 3
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