This depends on how you are checking the version. If you are using the "Get Windows version" function from the documentation, for example, you could do the following:
${If} $variable == "XP"
;code gets executed if Windows XP is installed.
${ElseIf} $variable == "2003"
;...
${Else}
;code gets executed if any other Windows version is installed.
${EndIf}
or use the variant:
${Switch} $variable
${Case} "XP"
;code gets executed if Windows XP is installed.
${Break}
${Case} "2003"
;...
${Break}
${Default}
;code gets executed if any other Windows version is installed.
${Break}
${EndSwitch}
If you are checking the exact version (unlikely), you could use the ${VersionCompare} instruction macro from the WordFunc.nsh header file; as indicated in the
documentation.