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; 1 Week Ago 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