Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get bios or motherbord number or seriel number

Status
Not open for further replies.

musalk

Programmer
Oct 30, 2001
33
DK
How to get the info on the computer with qbasic or qb45.
I just need a number of the computer there should be the same on all computers in the same model...or a littel diffrence is also acepteble

I think that it is a bios add or somthing like it..

plaese help
 
This isn't an exact science (see thread314-182358). In order to retrieve this sort of information from all machines you would require God-like insight into multiple archetectures and a profound understanding of information that is, as often as not, proprietary... (you aren't supposed to know those things LOL.)

But nothing stands in the way of experimentation. Buy a few IBMs, Hewlett Packards, ComPAQs, Dells, Gateways, Packard Bells (if you can stomache it) and several hundred generic machines with a wide range of motherboards... then start experimenting.

The various Award BIOSes might be a good place to start (they have always been popular and began to proliferate even more after the company was bought-out by Phoenix). The following code was generated following a bit of experimentation with some Award based machines. I used the memory-dumping routines found in faq314-137 and a Hex-viewer to find what I was looking for.

Retrieve the Award BIOS ID String:[tt]

' You should find the information somewhere
' shortly after this memory segment....

DEF SEG = &HFEC0
' Get a chunk of BIOS memory.
' The location of BIOS ID String may not be
' exact, so get a "searchable" chunk of mem.
' (Experimentation found the ID String starting
' at more than one segment boundry on various
' machines.)

FOR L = 0 TO &HFF
p = PEEK(L)
M$ = M$ + CHR$(p)
NEXT
DEF SEG
' You will probably find more than one instance
' of the string "Award" in the memory starting at
' segment &HFEC0, if not, the results would be
' meaningless.... Terminate program.

IF INSTR(M$, &quot;Award&quot;) < 1 THEN
PRINT &quot;This machine doesn't have an Award BIOS.&quot;
END
END IF
' The ID string will be preceeded by &quot;$&quot; and
' followed by Chr$(0), so use those to define
' the search.

SCheck = INSTR(M$, &quot;$&quot;)
Echeck = INSTR(SCheck + 1, M$, CHR$(0))
IF SCheck < 1 OR Echeck < 1 OR (Echeck - SCheck - 2) < 1 THEN
PRINT &quot;Can't find BIOS ID String.&quot;
ELSE
BIOSid$ = MID$(M$, SCheck + 1, Echeck - SCheck - 2)
IF INSTR(BIOSid$, &quot;-&quot;) < 1 or INSTR(BIOSid$, &quot;/&quot;) < 1 THEN
PRINT &quot;Invalid BIOS ID String.&quot;
END
END IF
PRINT &quot;Award BIOS ID String:&quot;
PRINT BIOSid$
END IF
[/tt]
Thread711-173216 shows the chipset and motherboard manufacturer values that can be used to parse the resulting string into detailed and meaningful information.

Perish the thought... if you want to create a routine that works on every machine, this is going to require a great deal of work. But I think you knew that.

Good luck. Feel free to ask for help if you encounter difficulties along the way.

VCA.gif
 
Thanks I wil try this and give you feedback on it... :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top