question

Dave-7402 avatar image
0 Votes"
Dave-7402 asked Dave-7402 commented

Writing UEFI Variable on Windows 10 IoT Core

What are my options for writing a UEFI variable in Windows 10 IoT Core? I currently have a UWP app that runs in the default user account that needs to set a UEFI variable.

  • There are capabilities to have UWP apps read and write UEFI variables, as described here . This sounds good until you look at the documentation for SetFirmwareEnvironmentVariableW(), where it also says the UWP application needs to run from an administrator account. I have read that UWP can only run in the default account on IoT Core; if that's true, these capabilities are non-starters.

  • Another piece of the system design incorporates a UMDF 2 driver. This driver runs in the local service account, and I can communicate with it via IOCTLs from the UWP app. This does have sufficient privilege to read UEFI variables, but as documented for SetFirmwareEnvironmentVariableW(), the UMDF driver cannot write UEFI variables. The attempt will fail, and GetLastError() will return 0x522, ERROR_PRIVILEGE_NOT_HELD.

  • There's the possibility of adding a KMDF driver, which could call ExSetFirmwareEnvironmentVariable(). The caller would also need SE_SYSTEM_ENVIRONMENT_PRIVILEGE, but perhaps within a kernel driver there would be a way to elevate the privilege as needed to accomplish this task.

Are there other possibilities I should investigate?

Thanks,
Dave






not-supported
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

RoyLi-MSFT avatar image
1 Vote"
RoyLi-MSFT answered Dave-7402 commented

Hello,

Welcome to Microsoft Q&A!


Currently, Microsoft Q&A supports the products listed over here: supported topics (more to be added later on).

Your question about UEFI and Windows IOT is not supported yet now. You could ask about this in the Windows IoT forum.


Thank you.


· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Funny, I tried posting to that forum originally and the post failed. Forget the exact message, but I saw the redirect notice to Q&A for some other forums and figured the IoT forum had been shuttered as well. Just tried again and it worked.

Sorry for adding to the noise on this forum!

Thanks,
Dave

0 Votes 0 ·