Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can NSIS scripts add 2 integers & 'OR' a StrCmp

Is it possible to add 2 numbers together in Native NSIS(not using libraries)?

Var hasVersion9    # values will either be 0 or 1
Var hasVersion10
Var hasVersion9Or10

IntCpy $hasVersion9Or10 hasVersion9+hasVersion10
(IntCmp $hasVersion9Or10 1 OR IntCmp $hasVersion9Or10 2) doThis doThat

Is it also possible to perform an 'Or' operation in a string comparision?

StrCmp $myVar ("1" OR "11") doThis doThat
like image 666
sazr Avatar asked Oct 19 '25 23:10

sazr


1 Answers

Use IntOp for number operations and the logiclib for if/orif

like image 73
Anders Avatar answered Oct 23 '25 02:10

Anders