You could use the COMNetview() UDF. Do a check on all found computers to see if they are online with the Ping() UDF and if they are check the OS type by reading the registry with the ReadValue() function. If the OS is XP write them using the WriteLine() function to a file if they are not XP write it to an other file.

Somethig like this.

 Code:
Break on

$rc = Open(1,"c:\xpsystems.txt",5)
$rc = Open(2,"c:\nonxpsystems.txt",5)
$rc = Open(3,"c:\notonline.txt",5)

$computers = COMNetView(domainname)

For Each $computer in $computers
	$online = Ping($computer,0,4,2500)
	If $online = "1"
		$winver = ReadValue("\\" + $computer + "\HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion","ProductName")
		If $winver = "Microsoft Windows XP"
			$rc = WriteLine(1,$computer + ";" + $winver + @CRLF)
		Else
			$rc = WriteLine(2,$computer + ";" + $winver + @CRLF)
		EndIf
	Else
		$rc = WriteLine(3,$computer + " is not online." + @CRLF)
	EndIf
Next

$rc = Close(1)
$rc = Close(2)
$rc = Close(3)


You should call or include these UDF's in the code above.
UDF Library » COMNetView() - Enumerate all computers in your domain
UDF Library » Ping() - checks for reply , or returns ip-address of remote host
KiXtart FAQ & How to's » How to use UDFs
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.