DogDog
DogDog

Reputation: 4920

How do I concatenate 2 strings in NSIS

How do I concatenate 2 strings in NSIS?

Upvotes: 46

Views: 23129

Answers (4)

Brad Turek
Brad Turek

Reputation: 2842

If you're looking to split up one long string over multiple lines, just use the \ inside the quotes:

MessageBox MB_OK "Alright, Mr. User you are done here, so you can go ahead and \ 
stop reading this message box about now."

Upvotes: 0

diego2k
diego2k

Reputation: 603

StrCpy $1 "Hello"

StrCpy $2 "World"

StrCpy $3 "$1 $2"

DetailPrint $3

Upvotes: 15

ehambright
ehambright

Reputation: 1593

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"

Upvotes: 21

TheHurt
TheHurt

Reputation: 1620

StrCpy $1 "one string"

StrCpy $2 " second string"

MessageBox MB_OK "$1$2"

Upvotes: 42

Related Questions