Old 8th March 2004, 15:36   #1
udden
Junior Member
 
Join Date: Mar 2004
Posts: 2
AdvReplaceInFile and FileWrite output

using the function AdvReplaceInFile to replace strings in a file, but the output file is unreadable!?
Want to replace dbname in a sql-script.

;copying the .sql file to the install dir here

Push "_DB_NAME_" #text to be replaced
Push "test" #replace with
Push all #replace all occurrences
Push all #replace all occurrences
Push "$INSTDIR\test.sql" #file to replace in
Call AdvReplaceInFile

But the resulting file is unreadable, just jibberish. Any ideas?
udden is offline   Reply With Quote
Old 10th March 2004, 14:49   #2
evilO
Senior Member
 
Join Date: Jan 2004
Location: Strasbourg, Europe
Posts: 117
Hi udden !

Well, I've tried your code on a 'dummy' test.sql file, and it does work perfectly... Did you manage to get this working ? Otherwise, could you post your file ?

evilO/Olive
evilO is offline   Reply With Quote
Old 10th March 2004, 16:06   #3
udden
Junior Member
 
Join Date: Mar 2004
Posts: 2
hey.

after quite some testning, i figured it out a few hours ago.

i simply printed every read, and found out that the file i was using contained some illegal characters in the beginning. when i tried with a new file, it worked like a charm

thanks for the reply anyways.

cheers
udden 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