I would like to know is there an option to find out if my Windows 7 or 10 PE is run on UEFI or BIOS system? I checked https://learn.microsoft.com/ru-ru/windows/win32/cimwin32prov/win32-bios and it seems there is no way to find out such information.
I could use Powershell Get-ComputerInfo but it is not present in PE Environment, unfortunately.
I know that HWINFO can detect BIOS or UEFI system, but in my case I need this information to be obtained with help of cmd script, so that I can pass results to deployment script which use diskpart to format disk for BIOS or UEFI system.