i think that the W2K version might be 5.0 for NT...
but not sure for Win ME
This is the Example code from ISWI:
function VersionExample(hMSI)
BOOL bIsShellExplorer, bIsWindowsNT4, bIsWindowsNT351;
BOOL bIsWindows95, bIsWindows98;
NUMBER nvResult; STRING svResult;
begin
// Initialize variables.
bIsShellExplorer = FALSE;
bIsWindowsNT4 = FALSE;
bIsWindowsNT351 = FALSE;
bIsWindows95 = FALSE;
bIsWindows98 = FALSE;
// Determine the target system's operating system.
GetSystemInfo( OS, nvResult, svResult );
if (nvResult = IS_WINDOWSNT) then
// Check for Windows NT 4.0 or Windows NT 3.51.
if (GetSystemInfo( WINMAJOR, nvResult, svResult ) = 0) then
if (nvResult >= 4) then
bIsShellExplorer = TRUE;
bIsWindowsNT4 = TRUE;
else
bIsWindowsNT351 = TRUE;
endif;
endif;
elseif (nvResult = IS_WINDOWS9X) then
bIsShellExplorer = TRUE;
// Check for Windows 95 or Windows 98.
GetSystemInfo (WINMINOR, nvResult, svResult);
if (nvResult < 10) then
bIsWindows95 = TRUE;
else
bIsWindows98 = TRUE;
endif;
endif;
end;