Only to say that the code here posted (and the additions) do work on my DELL Latitude C810.
The complete code I run was this:
code:
$machine=@wksta
? "Computer Name = " + $machine
? "IdentifyingNumber = " + WMIQuery("IdentifyingNumber","Win32_ComputerSystemProduct","$machine")
? "Name = " + WMIQuery("Name","Win32_ComputerSystemProduct","$machine")
? "Vendor = " + WMIQuery("Vendor","Win32_ComputerSystemProduct","$machine")
? "SerNo = " + WMIQuery("SerialNumber","Win32_SystemEnclosure")
? "Asset TAG = " + WMIQuery("SMBIOSAssetTag","Win32_SystemEnclosure")
?
get $lix ; pause
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
Only thing I can't say for sure is the Asset Tag, wich displays nothing here, but then again, I don't recall if I set anything for that in the BIOS...
On my PC it goes like this (some values edited!)
code:
Computer Name = PC_NAME
IdentifyingNumber = 6KFJ81L
Name = Latitude C810
Vendor = Dell Computer Corporation
SerNo = 6KFJ81L
Asset TAG =
Bye,
Fernando Madruga