i have the following scenario: our build server calls makensis.exe with (among others) a parameter that contains Service Pack information. In case the current release is a Service Pack, the parameter has a value. In case it is not, it is empty.

Ah, another case of mixing compile time code with runtime code. You can't use runtime code to change compile time code, it all has to be done with compile time code. ${If} and StrCmp are runtime functions.

This will set the define to "0" if it is not set by your build server. If the build server sets the define when it calls makensis, then the line will be ignored (/ifndef) and whatever the build server specified will prevail.

This will set the define to "0" if it is not set by your build server. If the build server sets the define when it calls makensis, then the line will be ignored (/ifndef) and whatever the build server specified will prevail.