Old 19th February 2008, 12:11   #1
sergiotaraujo
Junior Member
 
Join Date: Feb 2008
Posts: 12
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!!!
sergiotaraujo is offline   Reply With Quote
Old 19th February 2008, 13:11   #2
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
Review the manual,
4.9.2.10 ReadINIStr
4.9.2.13 WriteINIStr

Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine is offline   Reply With Quote
Old 19th February 2008, 15:03   #3
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
If it is not a true INI file with section headers, use ConfigRead and ConfigWrite, also in the user manual.

Stu
Afrow UK is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump