Search code examples
modeldosmode

Get system model # -- with a wiped hard drive


I'm trying to make a version of a Symantec Ghost boot disk that will automatically check the system model number, and choose which NIC driver is needed for that model. I have everything working except for getting the actual model #. I need to be able to get it even if the hard drive has been completely wiped, since this is running from a dos boot disk.

I've tried several commands - wmic, systeminfo - all of which work fine within windows, but I need one that can run in dos mode, and apparently these can't.

Any ideas on utilities and/or commands that could help me out?


Solution

  • You may be able to write a small piece of code and call the BIOS API directly.

    See http://www.cs.ubbcluj.ro/~forest/HtmlFolder/AC/NG/ng897c4.html for an (ancient) example:

    INT 15h,  C0h (192)      Return System Configuration                     many
    
        Reports the machine model number, sub-model number, BIOS revision
        level, and other hardware-specific attributes.
    
           On entry:      AH         C0h
    
           Returns:       Carry      Set if error, else cleared
                          AH         0
                          ES:BX      Pointer to a System Descriptor Table
    
      --------------------------------------------------------------------------
    
           Notes:         This service is not available for the PC, PCjr, XT
                          dated 11/08/82, and the AT dated 1/10/84. Use the
                          return state of AH to determine if the service is
                          returning valid information.
    
      System Descriptor Table
    
              Description              Length (byte)      Value
              Table length                   1              8
              System model number            1              ?
              Sub-model number               1              ?
              Bios Revision level            1              ?
              Feature Information            1              ?
              Reserved                       4              0
    

    This is the wikipedia list of all calls, and I'm pretty sure there will be a function in a compiler of choice (e.g Turbo C etc) that does this too.