Here is a script that i have gotten from someone on this board (sorry have forgotten who)
code:
$VerNmb1 = READVALUE "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion","CurrentVersion")
IF $VerNmb1 = "5.0"
$machine=@wksta
$TAG=WMIQuery("IdentifyingNumber","Win32_ComputerSystemProduct","$machine")
$MARKE=WMIQuery("Name","Win32_ComputerSystemProduct","$machine")
$TILLV=WMIQuery("Vendor","Win32_ComputerSystemProduct","$machine")
FUNCTION WMIQuery($what,$where, optional $computer)
dim $strQuery, $objEnumerator, $value
if not $computer $computer="@WKSTA" endif
$strQuery = "Select $what From $where"
$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
ELSE
$TAG = "N/A"
$MARKE = "N/A"
$TILLV = "N/A"
ENDIF
We have Dell here at work and it works like a charm
[ 18. February 2003, 09:50: Message edited by: uberpaco ]