|
Dim $ID,$SID,$NAME,$ID1,$PID,$MU1,$MU,$XH1,$XH,$ce
$objWMIService = ObjGet("winmgmts:\\.\root\wmi")
$colItems = $objWMIService.ExecQuery("SELECT * FROM WmiMonitorID")
For $info In $colItems
$NAME=$Info.Active
For $i = 0 To UBound($Info.SerialNumberID) - 1
$ID = $Info.SerialNumberID($i)
If StringLen($ID)<>0 Then
$SID=$SID&String(Chr($ID))
EndIf
Next
For $i = 0 To UBound($Info.ProductCodeID) - 1
$ID1 = $Info.ProductCodeID($i)
If StringLen($ID1)<>0 Then
$PID=$PID&String(Chr($ID1))
EndIf
Next
For $i = 0 To UBound($Info.ManufacturerName) - 1
$MU1 = $Info.ManufacturerName($i)
If StringLen($MU1)<>0 Then
$MU=$MU&String(Chr($MU1))
EndIf
Next
For $i = 0 To UBound($Info.UserFriendlyName) - 1
$XH1 = $Info.UserFriendlyName($i)
If StringLen($XH1)<>0 Then
$XH=$XH&String(Chr($XH1))
EndIf
Next
Next
MsgBox(1,"","序列号:"&$SID&" 显示器ID:"&$MU&$PID&" 显示器型号:"&$XH)
MsgBox(1,"",$NAME)
;UserFriendlyName,
;class WmiMonitorID : MSMonitorClass
;{;
; boolean Active;
; string InstanceName;
; uint16 ManufacturerName[]; 生产厂家
; uint16 ManufacturerNameLength;
; uint16 ProductCodeID[]; 显示器ID
; uint32 SerialNumberID[]; 显示器序号
; uint8 WeekOfManufacture; 生产周
; uint16 YearOfManufacture; 生产年
; uint16 UserFriendlyName; 显示器型号
; uint16 UserFriendlyNameLength;
;}; |
|