Writing UEFI Variable on Windows 10 IoT Core

Dave 26 Reputation points
2020-06-18T15:58:29.563+00:00

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 Monitored
Not Monitored
Tag not monitored by Microsoft.
38,792 questions
0 comments No comments
{count} votes

Accepted answer
  1. Roy Li - MSFT 33,001 Reputation points Microsoft Vendor
    2020-06-19T08:57:24.37+00:00

    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 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.