PDA

View Full Version : Rename INI Section



NewsArchive
10-24-2006, 02:27 AM
Hi again,

Is there a way to rename a SECTION in an INI file using Setup Builder?
I'm trying to figure a way to hack it but I'm not getting there fast enough.

Thanks in advance,
Eliza de Jager (CapeSoft)

NewsArchive
10-24-2006, 02:27 AM
Eliza,

Yes, no problem. You can use the "Handle Text File Operations" function.

For example, we have the following in our TEST.INI file:

--- ORIGINAL FILE ---
1
2
3
[CAPESOFT]
Version=6.2.0702.2
Setup=test.exe

Use the following code snipped to change [CAPESOFT] into [ELIZA]

Set Variable %SECTIONLINE% to ScriptItem->Find Line "[CAPESOFT]" from
"c:\test.ini"
If %SECTIONLINE% Greater Than "0" Then
Text File: Replace Line %SECTIONLINE% from "c:\test.ini" -- [ELIZA]
End

--- MODIFIED FILE ---
1
2
3
[ELIZA]
Version=6.2.0702.2
Setup=Alzheimers.exe

BTW, there is a bug in the latest 1659 build. Please download the file:
http://www.lindersoft.com/SBKERNEL.ZIP

and unzip it into your SetupBuilder \Bin32.

Does this help?

--
Friedrich Linder
CEO, Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder 5

NewsArchive
10-24-2006, 02:27 AM
> BTW, there is a bug in the latest 1659 build. Please download the file:
> http://www.lindersoft.com/SBKERNEL.ZIP
>
> and unzip it into your SetupBuilder \Bin32.

BTW, the bug in 1659 makes it impossible to use a variable in the "Line"
field. The new sbkernel.lib fixes this.

Friedrich