New
#30
I created a .bat file using that code that works in a Command Prompt. I put it in Documents then Sent it to the Desktop as a Shortcut.
I created a .bat file using that code that works in a Command Prompt. I put it in Documents then Sent it to the Desktop as a Shortcut.
@Paul Black
I don't get it on one line either, Command Prompt doesn't seem to have the same WordWrap as Notepad does.
Had you had the opportunity to test the command to see whether it displays results for CSM?
UEFI native (without CSM)
UEFI hybrid (with CSM)
Last edited by zbook; 08 Apr 2021 at 01:55.
Hey, it worked. 🙂
I'm tested: 1, 2, 3, 5
I'm lazy to do 4 bcoz of the DISM /Online /Cleanup-Image /RestoreHealth running in the background.
I took out the double quotes and that worked, thanks.
Thanks Matthew.
The output on yours IS on one line though. What I meant was that the output either looked like one of the following . . .
Code:The Motherboards Firmware is: Legacy
Code:The Motherboards Firmware is: UEFI
I always tend to over complicate these sort of things when they have a far simpler answer. Anyway, I went with the code that Matthew posted.
Thanks everyone.
@Paul Black, the following is an alternative that works in a batch file without administrative privileges:
For /f "Delims=" %%# in ('PowerShell $env:firmware_type') Do Echo Firmware is: %%#
I guess I should have tagged it with code to make it show the entire entry for everyone.Code:@PowerShell.exe -executionpolicy bypass -Command "Write-Host 'The Motherboards Firmware is:'$env:firmware_type
Excellent article, helped me a lot!
I have 3 OS on machine, 1 is MBR and I found it changed to efi when I loaded a new install of Win 10 on another drive.
I assume I can edit the bcd file to change this parameter ?
Also the identifier is different from the one shown when I boot into the legact OS.
Does this need to be changed as well?
thanks for any thoughts !