How to Read the Mainboard’s BIOS Information

Mainboard BIOS information can be very useful. Let’s say, for instance, that you want to make sure nobody makes illegal copies of your program. The most popular way is to use a serial number. But serial numbers can be copied or even published on the Internet. The only way to get over this is to make a unique serial number for every computer. But how? Well, how about using the mainboard’s BIOS serial number or date? :-) To make the serial number even harder to crack you may also use the system version or build number. To do so use the Windows API GetVersionEx() function. Now all you need is some kind of encrypting algorithm to create a serial number. Just add the user’s name and company and you have what you want :-)

Note: This code may not work on certain computer systems. Certain manufactors have their own BIOSes and therefor not always follow standards. Also this code is highly unlikely to work on Windows NT and it’s succesors. This is because NT is very restrictive of hardware access.

OK, but this tip is not about serial numbers ;-) So, if you want the mainboard BIOS information you have to read to from the memory. Here’s the code:

  var
    sMainBoardBiosCopyright,
    sMainBoardBiosDate,
    sMainBoardBiosName,
    sMainBoardBiosSerialNo: string;
  ...
  try
    sMainBoardBiosName := string(PChar(Ptr($FE061))); // Bios name
    sMainBoardBiosCopyright := string(PChar(Ptr($FE091))); // Bios copyright
    sMainBoardBiosDate := string(PChar(Ptr($FFFF5))); // Bios date
    sMainBoardBiosSerialNo := string(PChar(Ptr($FEC71)));  // Bios serial number
  except
    sMainBoardBiosName := 'Unsupported';
    sMainBoardBiosCopyright := 'Unsupported';
    sMainBoardBiosDate := 'Unsupported';
    sMainBoardBiosSerialNo := 'Unsupported';
  end;

Tags: , , , , , , , , , , , , , ,

1 Comments

  1. autologon
    May 3, 2008 at 06:01

    Does not work at Vista 64 (D2007) at all.

    Mike.

Leave a comment

OpenID Login

Standard Login