tags:

views:

78

answers:

1

Hi! I've tried http://www.codepedia.com/1/CMOS%5FC , but I got Privileged instruction exception, I guess the reason is I was in user mode (ring-3) and this operation requires ring-0. So, do you know any ways I can solve it?

I read that I could write driver using Windows Driver Foundation or try to use WinAPI.

+1  A: 

You are correct, you have to do this in kernel mode. Why do you want to read/change the CMOS? Could WMI give you the information you're looking for?

Paul Betts
Yes, I could read this data using WMI (actually, I'm doing that). The only thing I can't get about WMI is where I can find boot order information.I'm developing application to automate computer assembling process.That's why I need to set serial number, manufacturer, boot order, disable floppy and so on.
Ivri
Yep, you're up a creek then, all of the boot order stuff is highly BIOS-specific. If you're an OEM, you might have some leverage with the BIOS manufacturer for them to help you out a bit.
Paul Betts