Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   Replace a placeholder in a file (http://forums.winamp.com/showthread.php?t=304279)

congahonga 17th March 2009 08:29

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 17th March 2009 08:32

annotation: ConfigWrite ist no solution, because I must mainly replaice HTTP-Links, so i can't use Value and Entry..

Red Wine 17th March 2009 08:33

${ConfigWrite} see the documentation.

congahonga 17th March 2009 10:19

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)


All times are GMT. The time now is 17:49.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.