im trying to replace :\ with :\\
with StrReplace
and i keep getting
!insertmacro: StrReplace
!insertmacro: macro "StrReplace" requires 3 parameter(s), passed 7!
Error in script "Z:\webserv\extra\dev\nsis\WebServ.nsi" on line 1178 -- aborting creation process
>Exit code: 1
what Escape Char should i use to get this to work?
Escape Char
9 posts
What is the !insertmacro line you are using? You have probably forgotten to quote a parameter.
!macro StrReplace SOURCE_FILE SEARCH_TEXT REPLACEMENT
Push "${SOURCE_FILE}"
Push "${SEARCH_TEXT}"
Push "${REPLACEMENT}"
Call RIF
!macroend
works fine on all the others, just not this one
Push "${SOURCE_FILE}"
Push "${SEARCH_TEXT}"
Push "${REPLACEMENT}"
Call RIF
!macroend
works fine on all the others, just not this one
The insertmacro line, not the macro line.
If it tells you there are too many parameters it's probably a missing quote. For example: "C:\Program Files\My Program" would
qualify as 3 parameters if not quoted.
If it tells you there are too many parameters it's probably a missing quote. For example: "C:\Program Files\My Program" would
qualify as 3 parameters if not quoted.
sorry about that
!insertmacro StrReplace $INSTDIR\php\pear\PEAR_ENV.reg :\ :\\
ive also tried using
!insertmacro StrReplace $INSTDIR\php\pear\PEAR_ENV.reg ":\" ":\\"
didnt work
!insertmacro StrReplace $INSTDIR\php\pear\PEAR_ENV.reg :\ :\\
ive also tried using
!insertmacro StrReplace $INSTDIR\php\pear\PEAR_ENV.reg ":\" ":\\"
didnt work
Originally posted by kichikthis makes a lot of sense
The insertmacro line, not the macro line.
If it tells you there are too many parameters it's probably a missing quote. For example: "C:\Program Files\My Program" would
qualify as 3 parameters if not quoted.
i tried
!insertmacro StrReplace $INSTDIR\php\pear\PEAR_ENV.reg :\ ":\\"
and it worked, thanks a lot
A back slash at the end of the line means the next line is an extension of the current line. Once you quote it, it should work. I have copied the second line from your message and it worked. Are you sure the second one doesn't work? There is no reason it'll treat the next line as an extension if the last char is a quote.
[edit]ok, nm 🙂[/edit]
[edit]ok, nm 🙂[/edit]
Originally posted by kichiki hear yea, it should have worked, i have no idea why it didnt
A back slash at the end of the line means the next line is an extension of the current line. Once you quote it, it should work. I have copied the second line from your message and it worked. Are you sure the second one doesn't work? There is no reason it'll treat the next line as an extension if the last char is a quote.
[edit]ok, nm 🙂[/edit]
but if a take the quites of of the find variable and leave them on the replace variable, it works
Originally posted by kichiki tried the second one again today and it worked
A back slash at the end of the line means the next line is an extension of the current line. Once you quote it, it should work. I have copied the second line from your message and it worked. Are you sure the second one doesn't work? There is no reason it'll treat the next line as an extension if the last char is a quote.
[edit]ok, nm 🙂[/edit]
i must have had a type-o somewhere and couldnt see it yesterday