oscargee1
11th December 2008 20:43 UTC
${StrRep} is not working properly.
I want to replace "/s" as empty
Here's my code:
!include "StrFunc.nsh"
${StrRep}
....
StrCpy $1 "/s"
${StrRep} $0 $SOME_STRING $1 ""
But I found all special characters like ':' and '/' are missing and "s" wasn't replaced.
oscargee1
11th December 2008 20:44 UTC
Animaether
12th December 2008 06:34 UTC
are you using an outdated version, perhaps?
!include "StrFunc.nsh"
${StrRep}
Name "Test"
OutFile "SetupTest.exe"
InstallDir "$PROGRAMFILES\Test"
Section "A" "aSection"
StrCpy $1 "/s"
${StrRep} $0 "hello: /s /worlds/" $1 ""
MessageBox MB_OK "[$0]"
SectionEnd
gives messagebox:
---------------------------
Test Setup
---------------------------
[hello: /worlds/]
---------------------------
OK
---------------------------
Seems to me like only "/s" got replaced?