I have a INI file which contains c:/wamp
many times.
How can I replace this text with the {app}
extended/chosen constant value?
I know now how to replace a single value:
[INI]
Filename: "{app}\wampmanager.conf"; Section: "main"; Key: "installDir"; String: """{app}"""
I am reading from here
This is risky solution as TLama says.
You have to call this procedure at some point, e.g. on ssDone
or as an AfterInstall
[Code]
procedure Update;
var
A: AnsiString;
U: String;
begin
LoadStringFromFile(ExpandConstant('{app}\wampmanager.conf'), A);
U := A;
StringChange(U, 'c:/wamp', ExpandConstant('{app}'));
A := U;
SaveStringToFile(ExpandConstant('{app}\wampmanager.conf'), A, False);
end;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With