Help : How to replace character in a string ?
Hello,
I’am writing a installer which must insert a line in a given configuration file called “protege.propertiesâ€
The differents directories in file path must be separated with “\\†(double slash) (according this kind of configuration file syntaxe)
I’ve got the beginning of the path in the $INSTDIR variable be with only “\†(see following code)
============================================================
Section "GraphViz (2.8)"
…
FileOpen $0 $INSTDIR\applications\protege\protege.properties a
FileWrite $0 "dot.command="
FileWrite $0 $INSTDIR
FileWrite $0 "\\Graphviz\\bin\\dot.exe"
FileClose $0
SectionEnd
============================================================
I’ve got a compiler error (using the ${wordReplace} function) with this code :
============================================================
Section "GraphViz (2.8)"
…
${WordReplace} $INSTDIR "\" "\\" $modifiedInstDir
FileOpen $0 $INSTDIR\applications\protege\protege.properties a
FileWrite $0 "dot.command="
FileWrite $0 $modifiedInstDir
FileWrite $0 "\\Graphviz\\bin\\dot.exe"
FileClose $0
SectionEnd
============================================================
Any one could show me a sample of rigth piece of code ?
Regards
Eipimun