Jump to content

Does anybody know a tool read bios information


the.neon

Recommended Posts


The one you should need is smbios:

http://www.techweb.com/winmag/fixes/2000/0825.htm

Though I cannot say if it works under Bart, the 16 bit version works under 2000 and Xp, so it "should" work under Bart too.

If you are interested in BIOS modding, a fairly good list of progs is here:

http://www.icronticforums.com/showthread.php?t=507

jaclaz

Link to comment
Share on other sites

As others noted, PE 2004 supports WMI if you build it using the /WMI switch. Then you just need a VBS or WSH script to read what you want.

For example, this will pull the serial number from the BIOS.

strComputer = "."

Set objWMIService = GetObject("winmgmts:" _

& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colBIOS = objWMIService.ExecQuery _

("Select * from Win32_BIOS")

For each objBIOS in colBIOS

serialnumber = objBIOS.SerialNumber

Next

Microsoft's Scriptomatic tool will help you create quick WMI code.

Link to comment
Share on other sites

  • 4 years later...

I know I'm a little late for this thread, but I also had difficulty adding WMI support to BartPE. We use BartPE to deploy operating systems, which need to be automatically selected based on the hardware platform we are installing onto. Thus I needed to enable WMI in BartPE to be able to query the BIOS for its System and Model strings, which can then be used to automatically select the OS and start installation. Despite the overhead, I still wanted to maintain a fairly minimal footprint for BartPE. I tried several solutions suggested in this and other forums but none worked for me or provided enough information. This is how I finally got it to work:

1. Download and extract the Windows XPE plugin 1.0.7 (by Sherpya) for BartPE, and copy to the plugins directory.

2. Run PEBuilder and enable these plugins:

Windows XPE v1.0.7

Windows XPE: Defaults v1.0.7

Windows XPE: MMC v1.0.7

Windows XPE: WMI v1.0.7

Then build BartPE.

3. Boot a computer from new BartPE image. Start command prompt and type:

xpeinit -w

4. Wait until a subdirectory called "Repository" is created in %temp%. Copy it back to the PEBuilder file structure. Store it in the Includes directory specified in PEBuilder, under the path:

[includes folder]\I386\system32\wbem

5. Run PEBuilder and disable this plugin:

Windows XPE: Defaults v1.0.7

6. Build BartPE again, being sure that the Includes directory is populated in PEBuilder.

I provide this in hopes that someone else finds it valuable.

Link to comment
Share on other sites

BTW, I used AutoIt 3 to read the data from the BIOS by querying WMI via COM. This is the code I used:

#cs ----------------------------------------------------------------------------

AutoIt Version: 3.3.0.0
Author: Toasterking

Script Function:
Writes WMI strings from BIOS to file.

#ce ----------------------------------------------------------------------------

If FileExists(@TempDir & "\BIOS_Strings.txt") Then FileDelete(@TempDir & "\BIOS_Strings.txt")

$ObjWMIService = ObjGet('winmgmts:{impersonationLevel=impersonate}!\\' & @ComputerName & '\root\cimv2'); Create handle to WMI object
If (IsObj($ObjWMIService)) And (Not @error) Then; If successsful
$ColumnCompsys = $ObjWMIService.ExecQuery('Select * from Win32_ComputerSystem')
$BIOSSystem = 0
For $ObjCompsys In $ColumnCompsys
$BIOSSystem = $ObjCompsys.Model
Next
If $BIOSSystem Then FileWriteLine(@TempDir & "\BIOS_Strings.txt","System: " & $BIOSSystem)
$ColumnBIOS = $ObjWMIService.ExecQuery('Select * from Win32_BIOS')
$BIOSSerial = 0
For $ObjBIOS In $ColumnBIOS
$BIOSSerial = $ObjBIOS.SerialNumber
Next
If $BIOSSerial Then FileWriteLine(@TempDir & "\BIOS_Strings.txt","Serial: " & $BIOSSerial)
Else; If unsuccessful in creating COM object
MsgBox(262192,"Uh-oh","Cannot create a reference to a COM object for WMI. Unable to retrieve WMI information. Strings will not be read from the BIOS and auto-selection of Windows edition will not be properly influenced. Please notify a workstation configuration engineer that you received this message.")
EndIf

Link to comment
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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...