Fine sory for that thred
Now just two 3 things to confirm
? @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
what I have to assign in $what $from , optional $computer, optional and $where and $x
what about dim $strquery, and othere variables
_________________________
“I’ll not change you unless you don’t have intention to change yourself”
--H:Quran