i use this to check for a Windows 2003 Server in the .oninit Function.
It works with NSIS Unicode 2.38-1 but not with NSIS Unicode 2.42
Function CheckIfValidOS
!Include WinVer.nsh
${If} ${IsWin2003}
MessageBox MB_OK YES
${Else}
MessageBox MB_OK NO
${Endif}
FunctionEnd
It also works with the regular NSIS 2.42 (non Unicode)
Regards
Holger