2
I need to write a specific set of bytes (that I have stored in a file) to a specific EFI Variable on Windows 10. I understand this is possible in C/C++ with the Get/SetFirmwareEnvironmentVariable
functions, but I'd like to do this from a shell or similar and avoid having to compile a program just for this.
Is there a way of doing this from a batch or PowerShell script?
I thought the whole point of the UEFI partition was that, all of its contents were encrypted, and the key was required to unencrypt it, so if it didn't match, it would also be impossible for a boot virus or other malware to be added to the boot process. So, modifying anything in this partition, you are obviating the reason for the UEFI partition, unless you are also replacing the cipher in a secure way that would not allow anyone (or you to make changes) to insert malware instead. – DaaBoss – 2017-07-01T13:33:53.473
1No, the point of the ESP is to have an OS-agnostic standard defining how the system is booted and a communication method between the booting code of the MB and the OS. SecureBoot has nothing to do with it, you can disable it and you can still modify EFI variables with it. AFAIK, nothing is encrypted: The OS allows acces or not, but it's just a FAT partition. In any case, this has nothing to do with my question. – Darkhogg – 2017-07-01T16:28:25.340
What variable do you want to change? – testeaxeax – 2017-07-01T22:19:46.947
@nullterminatedstring
PreviousBoot
, the variable rEFInd uses to select the default. – Darkhogg – 2017-07-02T17:13:12.787