Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I concatenate 2 strings in NSIS

How do I concatenate 2 strings in NSIS?

like image 383
DogDog Avatar asked Apr 13 '10 20:04

DogDog


People also ask

How do you concatenate 2 strings?

You concatenate strings by using the + operator. For string literals and string constants, concatenation occurs at compile time; no run-time concatenation occurs. For string variables, concatenation occurs only at run time.


2 Answers

StrCpy $1 "one string"  StrCpy $2 " second string"  MessageBox MB_OK "$1$2" 
like image 200
TheHurt Avatar answered Nov 10 '22 00:11

TheHurt


If you want to concatenate using the same variable you can do something like this:

StrCpy $1 "ABC"  StrCpy $1 "$1123"  DetailPrint $1 

output is "ABC123"

like image 31
ehambright Avatar answered Nov 10 '22 00:11

ehambright