Sign in to follow this  
Followers 0
GoogleDude

Detect BIOS Manufacture using WMI

7 posts in this topic

I am having a problem altering the below example I found Here. am able to get it to only display the BIOS Manufacture by removing all the extra code. But what I need is to simply display a message and or run a function if if a paticular BIOS Manufacture is detected.

I am writing a script that makes changes to the windows registry only on certain motherboards with certain BIOS brands.

Can anyone help me set a $var if a particular BIOS is detected?

I cant seam to get the formatting correct.

here is all I am able to get to run without error. But cant seam to set any $vars if the returned string contains "award" and or "ami"

#include "CompInfo.au3" ;If you are wanting to pull WMI data from different computers then Declare $cI_CompName as the computer name before the include.

#region -- BIOS
Dim $BIOS

_ComputerGetBIOS($BIOS)

For $i = 1 To $BIOS[0][0] Step 1
    MsgBox(0, "Motherboard BIOS Info", "Name: " & $BIOS[$i][0] & @CRLF & _
            "Description: " & $BIOS[$i][4] & @CRLF & _
            "Manufacturer: " & $BIOS[$i][12])
Next
#endregion BIOS

Any help please!

GoogleDude

Share this post


Link to post
Share on other sites



Maybe...

#include "CompInfo.au3";If you are wanting to pull WMI data from different computers then Declare $cI_CompName as the computer name before the include.

#region -- BIOS
Dim $BIOS

_ComputerGetBIOS($BIOS)

For $i = 1 To $BIOS[0][0]
    If $BIOS[$i][12] = "award" Or "ami" Then
        $var = $BIOS[$i][12]
    EndIf
Next
#endregion BIOS

Share this post


Link to post
Share on other sites

Maybe...

#include "CompInfo.au3";If you are wanting to pull WMI data from different computers then Declare $cI_CompName as the computer name before the include.

#region -- BIOS
Dim $BIOS

_ComputerGetBIOS($BIOS)

For $i = 1 To $BIOS[0][0]
    If $BIOS[$i][12] = "award" Or "ami" Then
        $var = $BIOS[$i][12]
    EndIf
Next
#endregion BIOS
Awesome. That did the trick. Thank you very much. As always the community in this forum has come through for me. Thanks again.

GoogleDude

Share this post


Link to post
Share on other sites

Crap. I guess the STRING code might be needed. How can I make it so it looks for the word "award" in the $var? I think it is looking for the full result string not just the word "award" in the $var?

Thanks again.

GoogleDude

Share this post


Link to post
Share on other sites

Crap. I guess the STRING code might be needed. How can I make it so it looks for the word "award" in the $var? I think it is looking for the full result string not just the word "award" in the $var?

"If StringInStr() Then" or "Switch $var/Case"?

What's the problem handling the strings?

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

"If StringInStr() Then" or "Switch $var/Case"?

What's the problem handling the strings?

:)

Well when I run the below code I get the same results on 2 different PC 1 with an award bios and the other with out an award bios. It says BIOS Not Supported even though I am running it on a PC with an award bios.

#include "CompInfo.au3";If you are wanting to pull WMI data from different computers then Declare $cI_CompName as the computer name before the include.

Dim $BIOS

_ComputerGetBIOS($BIOS)

For $i = 1 To $BIOS[0][0]
    If $BIOS[$i][12] <> String("Award") or $BIOS[$i][4] <> String("Award") or $BIOS[$i][12] <> String("Award") Then
        MsgBox(1024,"BIOS Not Supported!","Your motherboard BIOS is not Supported.")
    EndIf
    If $BIOS[$i][12] = String("Award") or $BIOS[$i][4] = String("Award") or $BIOS[$i][12] = String("Award") Then
        MsgBox(1024,"BIOS Supported!","Your motherboard BIOS IS Supported.")
    EndIf
Next

Thanks for any help.

Share this post


Link to post
Share on other sites

I am able to get somewhat accurate results using the below code but it will only be accurate if the BIOS Manufacture Description in WMI Database is "Award Software International, Inc." Would this be an accurate way to do this? Or does anyone know of a better way?

Thanks,

#include "CompInfo.au3";If you are wanting to pull WMI data from different computers then Declare $cI_CompName as the computer name before the include.

Dim $BIOS

_ComputerGetBIOS($BIOS)

For $i = 1 To $BIOS[0][0]
    If $BIOS[$i][12] = String("Award Software International, Inc.") Then
        MsgBox(1024,"BIOS Supported!","Your motherboard BIOS IS Supported.")
    EndIf
    If $BIOS[$i][12] <> String("Award Software International, Inc.") Then
        MsgBox(1024,"BIOS Not Supported!","Your motherboard BIOS is not Supported.")
    EndIf
Next

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0