Hi,
I'm a newbie, and I started to use NSIS just few days ago.
I read some of these posts of the forum and some of the tutorial on the nsis website, but I didn't find the answer to my question.
I would like to add to my nsi a code to set a variable the parsed value of an existing variable.
For example: I need to parse $INSTDIR value. If e.g. $INSTDIR="C:\Program Files\MyApplication", I would like to create my new variable set to "C:/Program Files/MyApplication", changing backslashes ("\") with normal slashes ("/").
I would like to know what functions do this (with the syntax), or see examples given.
Any help is strongly appreciated.
Thank you very much.
Parsing $INSTDIR
3 posts
Use the "StrFunc" header file. It provides many string manipulation macros!
See "Docs\StrFunc\StrFunc.txt" for more info 😉!include "StrFunc.nsh"
${StrRep}
Section
${StrRep} $0 "$INSTDIR" "\" "/"
MessageBox MB_OK 'Result: "$0"'
SectionEnd
Ops I forgot to update the post. I found WordReplace at /Docs/AppendixE.html#E.3 and seems to work fine.
Anyway tnx LoRd_MuldeR 🙂
Anyway tnx LoRd_MuldeR 🙂