Hi Anna, how you doin ? Include the WMIQuery function at the bottom of your script, then call it like in the following script. Assuming your running Kixtart 4 and have WMI running, should return the "make" of your workstation.Break On
$Make = WMIQuery ("Manufacturer" ,"Win32_ComputerSystem" )[0 ]
?"Make=" $Make
Exit 1
FUNCTION WMIQuery ($sWhat , $sFrom , Optional $sComputer , Optional $sWhere , Optional $x )
Dim $sQuery , $objEnum , $sValue , $sItem , $lUbound
Dim $aTMP [0 ]
$sQuery = "Select " + $sWhat + " From " + $sFrom
If Not $sComputer $sComputer =@WKSTA EndIf
If $sWhere AND $x $sQuery = $sQuery + " Where " + $sWhere + " = '" +$x +"'" EndIf
$SystemSet = GetObject ("winmgmts:{impersonationLevel=impersonate}!//" +$sComputer )
If @ERROR Exit VAL ("&" +Right (DecToHex (@ERROR ),4 )) Return EndIf
$objEnum = $SystemSet.ExecQuery ($sQuery )
If @ERROR Exit VAL ("&" +Right (DecToHex (@ERROR ),4 )) Return EndIf
For Each $objInstance in $objEnum
If $objInstance
$ =Execute ("$$sValue = $$objInstance.$sWhat" )
Select
Case VarType ($sValue ) & 8192
For Each $sItem in $sValue
$lUbound = Ubound ($aTMP )
If $aTMP [$lUbound ] >' '
$lUbound = $lUbound +1
Redim Preserve $aTMP [$lUbound ]
EndIf
$aTMP [$lUbound ] = Trim ($sItem )
Next
Case 1
$lUbound = Ubound ($aTMP )
If $aTMP [$lUbound ] >' '
$lUbound = $lUbound +1
Redim Preserve $aTMP [$lUbound ]
EndIf
$aTMP [$lUbound ] = Trim ($sValue )
EndSelect
EndIf
Next
$WMIQuery = $aTMP
Exit VAL ("&" +Right (DecToHex (@ERROR ),4 ))
ENDFUNCTION
If you need more information regarding "what" is available from "where", just hollar ! -Shawn -Shawn