Getting BIOS Serial Number without WMI

血红的双手。 提交于 2020-02-23 06:53:40

问题


I'm attempting to get the serial number of the BIOS for a WinXP Embedded 32-bit system from a Win32 user mode application (MFC if that makes any diff).

I'm trying to get the same serial number that you can get via WMI from the 'Win32_BIOS' class from member "SerialNumber." The problem is that I can't use WMI as this will have to run on older systems that don't have WMI installed.

We basically have a series of machines with data encoded in this BIOS field so it can't be changed by the users, and we sometimes need this information to be output to a file and sent to us.

I've found 'GetSystemFirmwareTable', but the minimum Win version is WinXP 64-bit. WMI is out of the question, and we already have code to read it from a directly mapped physical address, but the problem is that the software we use that allows us to map those physical addresses is tied to our software, and our software cannot run at this stage in this particular use case (licensing).

As far as I've found, the only other way to map a physical hardware address from a user-mode application is to delve into driver territory and integrate some driver libraries into the application to allow it to map physical addresses.

Is there some kind of shadow copy that the OS makes that I can access without a huge amount of configuration?


回答1:


NTVDM in Windows XP map the first MiB of physical memory so you should be able to find the SMBIOS blob in that first megabyte and get the BIOS serial number from there. See the PDF specification for further reference.



来源:https://stackoverflow.com/questions/9835483/getting-bios-serial-number-without-wmi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!