Here is my subroutine which pretty much covers it...
;-----------------------------------------------------------------
; SUBROUTINE: check_os
; Determines what operating system and type is running on the host
; RETURNS:
; $os "Windows 95" = Windows 95
; "Windows 98" = Windows 98
; "Windows NT" = Windows NT
; $NT_type "Server" = Server
; "Server Domain Controller" = Either an NT server PDC or BDC
;
;-----------------------------------------------------------------
:check_os

; Select statements don't seem to like using @INWIN and @DOS... hmm wtf
;$inwin_str = @INWIN
;$dos_str = @DOS

$NT_Type = "" ; default to nothing unless NT is detected

IF @INWIN = 1
?"Windows NT detected"
$os="Windows NT"
; Determine what type of Windows NT
$Rtn=ReadValue("hkey_local_machine\system\currentcontrolset\control\productoptions","producttype")
Select
Case $Rtn="WINNT"
; /* System is a Windows NT Workstation */
$NT_Type = "Workstation"
Case $Rtn="SERVERNT"
; /* System is running Windows NT Server (domain member) */
$NT_Type = "Server"
Case $Rtn="LANMANNT"
$NT_Type = "Server Domain Controller"
EndSelect
Endif

If @INWIN = 2
Select
Case @DOS = "4.0"
$os = "Windows 95"
? "Windows 95 detected"
Case @DOS = "4.10"
$os = "Windows 98"
? "Windows 98 detected"
EndSelect
Else
$os = "Unknown"
? "Unknown system type"
Endif
Return