views:

119

answers:

3

Is there any way to get the boot order programmatically, on Windows ?

+2  A: 

On Windows 98 it was possible to read CMOS data (BIOS settings) by using the CPU ports.
If I'm not mistaken, Windows XP doesn't allow that anymore.

Motherboard manufacturers usually provide a utility for storing BIOS settings in a file.
Even with that information you'll probably need the specifications of the BIOS version so you can locate the right offset of "BOOT order" byte (assuming that it is stored in a single byte).

Update: I haven't tested it but check out SMBIOS Support in Windows.
And more specifically the GetSystemFirmwareTable Function.

If I understood correctly, with the above function you'll be able to get the BIOS data stored in the lowest 1MB of physical memory. Still, you must know where the boot order information is stored.

Nick D
A: 

Yes, use Kernel Booting apis (internal, ordinal dynamic call)

marcus