; Generated by AutoIt ScriptOMatic
$wbemFlagReturnImmediately = 0x10
$wbemFlagForwardOnly = 0x20
$colItems = ""
$strComputer = "localhost"
$OutputTitle = ""
$Output = ""
$OutputTitle &= "Computer: " & $strComputer & @CRLF
$OutputTitle &= "==========================================" & @CRLF
$objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\CIMV2")
$colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_ComputerSystemProduct", "WQL", _
$wbemFlagReturnImmediately + $wbemFlagForwardOnly)
If IsObj($colItems) Then
Local $Object_Flag = 0
For $objItem In $colItems
$Object_Flag = 1
$Output &= "Caption: " & $objItem.Caption & @CRLF
$Output &= "Description: " & $objItem.Description & @CRLF
$Output &= "IdentifyingNumber: " & $objItem.IdentifyingNumber & @CRLF
$Output &= "Name: " & $objItem.Name & @CRLF
$Output &= "SKUNumber: " & $objItem.SKUNumber & @CRLF
$Output &= "UUID: " & $objItem.UUID & @CRLF
$Output &= "Vendor: " & $objItem.Vendor & @CRLF
$Output &= "Version: " & $objItem.Version & @CRLF
If MsgBox(1, "WMI Output", $Output) = 2 Then ExitLoop
$Output = ""
Next
If $Object_Flag = 0 Then MsgBox(1, "WMI Output", $OutputTitle)
Else
MsgBox(0, "WMI Output", "No WMI Objects Found for class: " & "Win32_ComputerSystemProduct")
EndIf
$strComputer = "."
$objWMIService = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\" & $strComputer & "\root\cimv2")
$colItems = $objWMIService.ExecQuery("Select * from Win32_PhysicalMedia")
For $objItem In $colItems
MsgBox(0, "HDD serial number", $objItem.SerialNumber)
Next
$Key1 = RegRead("HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\BIOS", "BaseBoardManufacturer")
$Key2 = RegRead("HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\BIOS", "BaseBoardProduct")
$Key3 = RegRead("HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\BIOS", "BIOSVendor")
$Key4 = RegRead("HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0", "ProcessorNameString")
Func _MB()
$oService = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
If @error Then
Exit
EndIf
For $oMB In $oService.ExecQuery("SELECT * FROM Win32_BaseBoard")
MsgBox(0,"",$oMB.Manufacturer & @CRLF& _
$oMB.Product & @CRLF& _
$oMB.SerialNumber & @CRLF)
Next
EndFunc
$oService = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
If IsObj($oService) Then
MsgBox(0,"Validation:","This Object!")
_MB($oService)
Else
MsgBox(0,"Error:","This is not Object!")
EndIf
Func _MB($oService)
For $oMB In $oService.ExecQuery("SELECT * FROM Win32_BaseBoard")
MsgBox(0,"",$oMB.Manufacturer & @CRLF& _
$oMB.Product & @CRLF& _
$oMB.SerialNumber & @CRLF)
Next
EndFunc
Dim $WbemFlagReturnImmediately = 0x10
Dim $WbemFlagForwardOnly = 0x20
$oService = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
If IsObj($oService) Then
MsgBox(0,"Validation:","This Object!")
_MB($oService)
Else
MsgBox(0,"Error:","This is not Object!")
EndIf
Func _MB($oService)
For $oMB In $oService.ExecQuery("SELECT * FROM Win32_BaseBoard","WQL", BitOR($WbemFlagReturnImmediately, $WbemFlagForwardOnly))
MsgBox(0,"",$oMB.Manufacturer & @CRLF& _
$oMB.Product & @CRLF& _
$oMB.SerialNumber & @CRLF)
Next
EndFunc