Archive: find a text and replace it


find a text and replace it
Hello...
I wanna say thanks for who answer my other questions!!
THANKS!!!
But now I have another one!!

I need find a line in a file and replace it for another one using a NSIS variable!!

Like this..
I have this file: php.ini
and in this file, I have this line:
extension_dir = "c:/PHP/ext/"

I need replace this line for this one:
extension_dir = "$PROGRAMFILES/PHP/ext/"

anybody has a simple code to made it?
I need full code to made it! Cause I really don`t know!!!
Thanks a lot!!!


Review the manual,
4.9.2.10 ReadINIStr
4.9.2.13 WriteINIStr


If it is not a true INI file with section headers, use ConfigRead and ConfigWrite, also in the user manual.

Stu