获取系统型号# - 使用擦除的硬盘驱动器

时间:2012-09-10 11:35:26

标签: model dos mode

我正在尝试制作一个版本的Symantec Ghost启动盘,它会自动检查系统型号,并选择该型号需要哪个NIC驱动程序。除了获得实际的模型#外,我一切正常。即使硬盘已完全擦除,我也需要能够获取它,因为它是从dos启动盘运行的。

我已经尝试了几个命令--wmic,systeminfo - 所有这些命令在windows中运行正常,但是我需要一个可以在dos模式下运行的命令,显然这些命令不能。

有关实用程序和/或命令的任何想法可以帮助我吗?

1 个答案:

答案 0 :(得分:0)

您可以编写一小段代码并直接调用BIOS API。

有关(古老)示例,请参阅http://www.cs.ubbcluj.ro/~forest/HtmlFolder/AC/NG/ng897c4.html

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

这是wikipedia list of all calls,我很确定在选择的编译器中会有一个函数(例如Turbo C等)也会这样做。

相关问题