How do I get the BIOS manufacturer and model in C++ without using WMI?

15,735

Solution 1

It's in the registry at HKEY_LOCAL_MACHINE/HARDWARE/DESCRIPTION/System

You have SystemBiosVersion, SystemBiosDate, etc.

Also, there is a sub key called BIOS which has yet more information such as BIOSVendor and BIOSVersion.

Depending on who built the system you should also be able to get the BaseBoardManufacturer and other cool info.

UPDATE

You might check out this link. It's VB code. They try to read it from the registry, but failing that fall back to pulling string data out of a memory address. In this case it's &HFE061 for the Version and &HFFFF5 for the date.

Solution 2

You can map in the SMBIOS memory and parse it. Most of the information you want is in there. This can be done from any language that has access to system memory mapping primitives.

Also, this document has information about the Win32 functions that can be used to query SMBIOS.

Share:
15,735
jjxtra
Author by

jjxtra

DigitalRuby - My software company IPBan Pro - High Performance and easy to use security software for blocking hackers and botnets on Windows and Linux YouDoodle - Fun drawing on photo app for iOS YouDoodle Android - Android You Doodle CreateGuid - Create a guid quicker and faster than anywhere else 99Colors - CSS Colors without gobs of ads CodeTable - Unicode Table without gobs of ads eFrankenstein - Anonymous weird chat ____==========_______ _--____ | | "" " "| \ / )8} ^^^| 0 | = | o 0 | =/_ +-==B vvv|"" | = | ' "" "| \_____/ |____|________|________| (_( )\________/___( )__) |\ \ / /\ | \ \ / /\ \ | |\ \ / / \ \ ( )( ) ( \ ( ) \ / / \ \ \ \ \| |\ \ \ | | | | )____ \ \ \ )___ ( ) / / ( ) (/ / /___\ /__/ /___\ /__/ THERE BE DRAGONS HERE! . _///_, . / ` ' '> ) o' __/_'> ( / _/ )_\'> ' "__/ /_/\_> ____/_/_/_/ /,---, _/ / "" /_/_/_/ /_(_(_(_ \ ( \_\_\\_ )\ \'__\_\_\_\__ ).\ //____|___\__) )_/ | _ \'___'_( /' \_ (-'\'___'_\ __,'_' __) \ \\___(_ __/.__,' ,((,-,__\ '", __\_/. __,' '"./_._._-'

Updated on June 15, 2022

Comments

  • jjxtra
    jjxtra almost 2 years

    We are running windows xp pro service pack 3 both 32 bit and 64 bit. We are using WMI to get the BIOS manufacturer and model, but we would really prefer an approach that used either the Win32 API or assembly language or something besides WMI or COM. Code samples are most welcome.

  • jjxtra
    jjxtra almost 15 years
    On my vista 32 bit machine this works great, however we run some 32 bit apps on windows xp professional x64 and these keys do not have any information in them.
  • jjxtra
    jjxtra almost 15 years
    Thanks for the SMBIOS links. The Win32 calls in the document appear to not be available on XP Pro 32 bit from what I can see in the MSDN documentation though.
  • NotMe
    NotMe almost 15 years
    According to this article from 2002, it's supposed to be there. pctools.com/guides/registry/detail/830
  • jjxtra
    jjxtra almost 15 years
    Is there a visual studio C++ project for this? I couldn't find anything.
  • jjxtra
    jjxtra almost 15 years
    Weird. We also have some server 2003 standard boxes and they don't have the keys populated either...
  • Josh Kelley
    Josh Kelley almost 15 years
    It's a port of a Linux tool, so probably not.
  • NotMe
    NotMe almost 15 years
    Interesting. Are you sure your looking at the right key? Another thought is that it's a permissions issue or something. I just checked 3 of our servers. All of the had SystemBiosDate and SystemBiosVersion. under the hardware/description/system key.
  • jjxtra
    jjxtra almost 15 years
    Are you running xp or win 2003 servers?
  • jjxtra
    jjxtra almost 15 years
    Looks like because the machine was imaged these settings are not available. However this seems like the easiest solution so I am accepting your answer.
  • Vern Jensen
    Vern Jensen almost 10 years
    Running on Windows 7 within Parallels, there is a BIOS key, but it's empty. No SystemBiosVersion, SystemBiosDate, or anything else.
  • Steinfeld
    Steinfeld over 9 years
    Keep in mind that you should not count on a reliable answer since the registry can be easily changed, this of course, is depended on you necessity.
  • PAX
    PAX about 3 years