Old 17th March 2009, 08:29   #1
congahonga
Junior Member
 
Join Date: Dec 2008
Posts: 39
Replace a placeholder in a file

Hi there,

I have three files, that must be filled with values that i get during installation process, because the user must input these values in textfields.

How can I replace a placeholder (e.g $XXXX) with a NSIS variable in(!) a config-file ?


-----------------------------
# config File

blabla=1230

aValue=$XXXX (this must be repaced)

link=http://$XXXX/test/test.dll
-------------------------------

Greetings from Jochen Graulberger
from BLACK-FORREST (where it's darker than in the night)
congahonga is offline   Reply With Quote
Old 17th March 2009, 08:32   #2
congahonga
Junior Member
 
Join Date: Dec 2008
Posts: 39
annotation: ConfigWrite ist no solution, because I must mainly replaice HTTP-Links, so i can't use Value and Entry..
congahonga is offline   Reply With Quote
Old 17th March 2009, 08:33   #3
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
${ConfigWrite} see the documentation.

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 17th March 2009, 10:19   #4
congahonga
Junior Member
 
Join Date: Dec 2008
Posts: 39
This is the solution

No, sorry, ConfigWrite is NOT a solution, because it can only be helpful with Value / Entry Pairs, not with http-Links or other free text that should be sustituted

The solution is the library

TextReplace.nsh (search in Forum)
congahonga 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