Question:

How to detect Windows 2000 SP4 and abort the installation if SP4 is not installed?

Answer:

Set Variable %MAJORWINDOWSVERSION% to ScriptItem->Get System Information(Major Windows Version)
Set Variable %MINORWINDOWSVERSION% to ScriptItem->Get System Information(Minor Windows Version)
Set Variable %SERVICEPACKNUMBER% to ScriptItem->Get System Information(Service Pack Number)

If %MAJORWINDOWSVERSION% Equals "5" And %MINORWINDOWSVERSION% Equals "0" Then
If %SERVICEPACKNUMBER% Less Than "4" Then
Display Message Box "Windows 2000 Service Pack 4 is required!" -- ""
Exit Installation
End
End