If Not(IsDeclared("$cI_CompName")) Then
Global $cI_CompName = @ComputerName
EndIf
Global Const $cI_VersionInfo = "00.03.08"
Global Const $cI_aName = 0, _
$cI_aDesc = 4
Global $wbemFlagReturnImmediately = 0x10, _ ;DO NOT CHANGE
$wbemFlagForwardOnly = 0x20 ;DO NOT CHANGE
Dim $BIOS
_ComputerGetBIOS($BIOS)
For $i = 1 To $BIOS[0][0] Step 1
MsgBox(0, "Test _ComputerGetBIOS", "Name: " & $BIOS[$i][0] & @CRLF & _
"Status: " & $BIOS[$i][1] & @CRLF & _
"BIOS Characteristics: " & $BIOS[$i][2] & @CRLF & _
"BIOS Version: " & $BIOS[$i][3] & @CRLF & _
"Description: " & $BIOS[$i][4] & @CRLF & _
"Build Number: " & $BIOS[$i][5] & @CRLF & _
"Code Set: " & $BIOS[$i][6] & @CRLF & _
"Current Language: " & $BIOS[$i][7] & @CRLF & _
"Identification Code: " & $BIOS[$i][8] & @CRLF & _
"Installable Languages: " & $BIOS[$i][9] & @CRLF & _
"Language Edition: " & $BIOS[$i][10] & @CRLF & _
"List of Languages: " & $BIOS[$i][11] & @CRLF & _
"Manufacturer: " & $BIOS[$i][12] & @CRLF & _
"Other Target OS: " & $BIOS[$i][13] & @CRLF & _
"Primary BIOS: " & $BIOS[$i][14] & @CRLF & _
"Release Date: " & $BIOS[$i][15] & @CRLF & _
"Serial Number: " & $BIOS[$i][16] & @CRLF & _
"SM BIOS BIOS Version: " & $BIOS[$i][17] & @CRLF & _
"SM BIOS Major Version: " & $BIOS[$i][18] & @CRLF & _
"SM BIOS Minor Version: " & $BIOS[$i][19] & @CRLF & _
"SM BIOS Present: " & $BIOS[$i][20] & @CRLF & _
"Software Element ID: " & $BIOS[$i][21] & @CRLF & _
"Software Element State: " & $BIOS[$i][22] & @CRLF & _
"Target Operating System: " & $BIOS[$i][23] & @CRLF & _
"Version: " & $BIOS[$i][24])
Next
;===============================================================================
; Description: Returns the BIOS information in an array.
; Parameter(s): $aBIOSInfo - By Reference - BIOS Information array.
; Requirement(s): None
; Return Value(s): On Success - Returns array of BIOS Information.
; $aBIOSInfo[0][0] = Number of BIOSs
; $aBIOSInfo[$i][0] = Name ($i starts at 1)
; $aBIOSInfo[$i][1] = Status
; $aBIOSInfo[$i][2] = BIOS Characteristics
; $aBIOSInfo[$i][3] = BIOS Version
; $aBIOSInfo[$i][4] = Description
; $aBIOSInfo[$i][5] = Build Number
; $aBIOSInfo[$i][6] = Code Set
; $aBIOSInfo[$i][7] = Current Language
; $aBIOSInfo[$i][8] = Identification Code
; $aBIOSInfo[$i][9] = Installable Languages
; $aBIOSInfo[$i][10] = Language Edition
; $aBIOSInfo[$i][11] = List Of Languages
; $aBIOSInfo[$i][12] = Manufacturer
; $aBIOSInfo[$i][13] = Other Target OS
; $aBIOSInfo[$i][14] = Primary BIOS
; $aBIOSInfo[$i][15] = Release Date
; $aBIOSInfo[$i][16] = Serial Number
; $aBIOSInfo[$i][17] = SM BIOS BIOS Version
; $aBIOSInfo[$i][18] = SM BIOS Major Version
; $aBIOSInfo[$i][19] = SM BIOS Minor Version
; $aBIOSInfo[$i][20] = SM BIOS Present
; $aBIOSInfo[$i][21] = Software Element ID
; $aBIOSInfo[$i][22] = Software Element State
; $aBIOSInfo[$i][23] = Target Operating System
; $aBIOSInfo[$i][24] = Version
; On Failure - @error = 1 and Returns 0
; @extended = 1 - Array contains no information
; 2 - $colItems isnt an object
; Author(s): Jarvis Stubblefield (support "at" vortexrevolutions "dot" com)
; Note(s):
;===============================================================================
Func _ComputerGetBIOS(ByRef $aBIOSInfo)
Local $colItems, $objWMIService, $objItem
Dim $aBIOSInfo[1][25], $i = 1
$objWMIService = ObjGet("winmgmts:\\" & $cI_Compname & "\root\CIMV2")
$colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_BIOS", "WQL", $wbemFlagReturnImmediately + $wbemFlagForwardOnly)
If IsObj($colItems) Then
For $objItem In $colItems
ReDim $aBIOSInfo[UBound($aBIOSInfo) + 1][25]
$aBIOSInfo[$i][0] = $objItem.Name
$aBIOSInfo[$i][1] = $objItem.Status
$aBIOSInfo[$i][2] = $objItem.BiosCharacteristics(0)
$aBIOSInfo[$i][3] = $objItem.BIOSVersion(0)
$aBIOSInfo[$i][4] = $objItem.Description
$aBIOSInfo[$i][5] = $objItem.BuildNumber
$aBIOSInfo[$i][6] = $objItem.CodeSet
$aBIOSInfo[$i][7] = $objItem.CurrentLanguage
$aBIOSInfo[$i][8] = $objItem.IdentificationCode
$aBIOSInfo[$i][9] = $objItem.InstallableLanguages
$aBIOSInfo[$i][10] = $objItem.LanguageEdition
$aBIOSInfo[$i][11] = $objItem.ListOfLanguages(0)
$aBIOSInfo[$i][12] = $objItem.Manufacturer
$aBIOSInfo[$i][13] = $objItem.OtherTargetOS
$aBIOSInfo[$i][14] = $objItem.PrimaryBIOS
$aBIOSInfo[$i][15] = __StringToDate($objItem.ReleaseDate)
$aBIOSInfo[$i][16] = $objItem.SerialNumber
$aBIOSInfo[$i][17] = $objItem.SMBIOSBIOSVersion
$aBIOSInfo[$i][18] = $objItem.SMBIOSMajorVersion
$aBIOSInfo[$i][19] = $objItem.SMBIOSMinorVersion
$aBIOSInfo[$i][20] = $objItem.SMBIOSPresent
$aBIOSInfo[$i][21] = $objItem.SoftwareElementID
$aBIOSInfo[$i][22] = $objItem.SoftwareElementState
$aBIOSInfo[$i][23] = $objItem.TargetOperatingSystem
$aBIOSInfo[$i][24] = $objItem.Version
$i += 1
Next
$aBIOSInfo[0][0] = UBound($aBIOSInfo) - 1
If $aBIOSInfo[0][0] < 1 Then
SetError(1, 1, 0)
EndIf
Else
SetError(1, 2, 0)
EndIf
EndFunc ;_ComputerGetBIOS
Func __StringToDate($dtmDate)
Return (StringMid($dtmDate, 5, 2) & "/" & _
StringMid($dtmDate, 7, 2) & "/" & StringLeft($dtmDate, 4) _
& " " & StringMid($dtmDate, 9, 2) & ":" & StringMid($dtmDate, 11, 2) & ":" & StringMid($dtmDate,13, 2))
EndFunc ;__StringToDate Function created by SvenP Modified by JSThePatri