It is kind of hard to read, but the usual problems are:

missing quotes
endifs

I suggest that you make a simple script like this one:
code:
? @kix
? WMIQuery("SerialNumber","Win32_BIOS")
? @Serror

exit
;****************************************************************************************************
FUNCTION WMIQuery($what,$from,optional $computer,optional $where, optional $x)
dim $strQuery, $objEnumerator, $value
if not $computer $computer="@WKSTA" endif
$strQuery = "Select $what From $from"
if $where and $x $strQuery = $strQuery + " Where $where = '$x'" endif
$SystemSet = GetObject("winmgmts:{impersonationLevel=impersonate}!//$computer")
$objEnumerator = $SystemSet.ExecQuery($strQuery)
For Each $objInstance in $objEnumerator
If @Error = 0 and $objInstance <> ""
$=execute("$$value = $$objInstance.$what")
$WMIQuery="$value"+"|"+"$WMIQuery"
EndIf
Next
$WMIQuery=left($WMIQuery,len($WMIQuery)-1)
exit @error
ENDFUNCTION



[ 06. November 2002, 21:56: Message edited by: Radimus ]
_________________________
How to ask questions the smart way <-----------> Before you ask