Trying to see if I am in UEFI or BIOS from WinPE running from an HTA. My starting point below:
Found the below as my solution that works :)
<script type='text/vbscript'>
Set objShell = CreateObject("WScript.Shell")
Sub Window_Onload
RegB = objShell.regread("HKLM\System\CurrentControlSet\Control\PEFirmwareType")
If RegB = 1 Then
Boot.innerhtml = "Legacy "
ElseIf RegB = 2 Then
Boot.innerhtml = "UEFI "
Else
Boot.innerhtml = "" & RegB & " "
End If
End Sub
</Script>
<body>
<H1>Running in <span id= "boot" class= "name"></span>mode</H1>
</BODY>