Trying to see if I am in UEFI or BIOS from WinPE running from an HTA. My starting point below:
<script type='text/vbscript'>
Sub RegBOOT
If oReg.EnumValues(HKEY_LOCAL_MACHINE, "System\CurrentControlSet\Control", "PEFirmwareType", "") = 1 Then
BOOT.innerText = "Legacy BIOS"
If oReg.EnumValues(HKEY_LOCAL_MACHINE, "System\CurrentControlSet\Control", "PEFirmwareType", "") = 2 Then
BOOT.innerText = "UEFI"
End If
End Sub
</Script>
<BODY>
<p>You are in <span id="BOOT"></span> mode</p>
</BODY>