We have about 350 PC's, from various makes and models (Compaq, Dell, and some unknowns), but only buy Dell nowadays. With WMI, the Latitude L400 / NT4 SP6a for example, is not recognised. Latitude C610 W2K / Optiplex GX150 NT4, and Optiplex 260 W2K works fine.
I'm using this code:
code:
; Determine Serialnr
$Serialnr = WMIQuery("SerialNumber","Win32_BIOS")
If LEN("$Serialnr") < 2
$Serialnr = WMIQuery("SerialNumber","Win32_SystemEnclosure")
If Instr($Serialnr,"|")
For Each $Return in Split($Serialnr,"|")
If LEN($Return)<10
$Serialnr = $Return
Endif
Next
Endif
If LEN("$Serialnr") < 2
$Serialnr = WMIQuery("IdentifyingNumber","Win32_ComputerSystemProduct","@WKSTA")
Endif
Endif
Endif
; Determine Model name
$MachineName = WMIQuery("Name","Win32_ComputerSystemProduct","@WKSTA")
If $MachineName = ""
$MachineName = "-------"
Endif
Can you tell me where can I download a program with which I can see what info is available via WMI, so that I can check on the L400 for example what to use instead of Win32_ComputerSystemProduct ?
P.s. We use all of the OS-ses; 95, 98, NT4, W2K.
[ 31. July 2003, 13:28: Message edited by: Jeroen ]
_________________________
Regards, Jeroen.
There are two ways to write error-free programs. Only the third one works.