21

I have a Windows 7 x64 install USB and want to know if the installer has booted into EFI or BIOS mode.

  • I found a solution here, but it doesn't work since notepad couldn't find:
    \Windows\Panther\setupact.log
    
7
  • At what point do you enter the command prompt? I think you have to install it first. I think the "welcome" screen as referred to in the forum post you linked to is in fact the screen that you see after completing the installation. This is the Windows Welcome phase, as Microsoft calls it. See this link: support.microsoft.com/kb/927521
    – Samir
    Aug 22, 2012 at 9:51
  • That makes sense. I enter the command before completing the installation. So is there any other way to identify EFI or BIOS boot ? Aug 22, 2012 at 10:21
  • 1
    You don't have to install it first. I was mistaken. They are referring to the installation welcome screen, not the so called OOBE (out of box experience). So you do have to enter the command prompt before starting the installation process! I'm sorry about that. Otherwise you are wasting your time installing, without knowing if the installation will turn out the way you want it or not.
    – Samir
    Aug 22, 2012 at 16:40
  • Various other methods are: youtube.com/watch?v=RZKEJ1zljmk Sep 12, 2014 at 22:09
  • One alternative is to force the mode. On most machines, hitting something like F12 brings up a boot menu, from which you can pick if you want to boot using UEFI or "legacy". You should see a menu like this: eightforums.com/attachments/installation-setup/…
    – aalaap
    Aug 2, 2017 at 16:43

6 Answers 6

20

Now, I'll cut to the chase and show you how to find this log file.

I have done this with a retail Windows Vista DVD disc, just for the purpose of demonstrating this. But this should be the same even if you boot from a USB flash drive, or if you use Windows 7.

When you boot from a Windows DVD or USB you will first see a dialog where you choose language and keyboard layout. Do this step and click Next.

Then click the Install now button.

When you get to the screen where it asks you for a product key press Shift+F10 to get to the command prompt.

Your marker should be at X:\Sources> now.

how to search all windows directories for log files

To look through the folders for log files you can type dir ..\*.log /s

how to open a log file in notepad from command prompt

The file you are looking for is titled setupact.log. Can you see it in the results? It should be located at X:\Windows\panther.

To open this file in notepad without changing directory you can type notepad ..\windows\panther\setupact.log

If the file is there, which it should be, then this will open it in Notepad. Now while in Notepad, press Ctrl+F and type in callback and press Enter.

You should see several entries with this word, but the one you are interested in is titled Callback_BootEnvironmentDetect. Press Enter repeatedly until you spot it.

how to find the word "callback" in the log in notepad

In my case, it says Callback_BootEnvironmentDetect:FirmwareType 1.

I think this is because this is on Windows Vista, and since this is a BIOS system I am guessing that Type 1 stands for BIOS. So if you would do the same with Vista on an UEFI system it would most likely say Type 2. For Windows 7 the same lines would probably just say UEFI or BIOS.

In short...

Windows Vista:

Callback_BootEnvironmentDetect:FirmwareType 1 means BIOS

Callback_BootEnvironmentDetect:FirmwareType 2 means UEFI

Windows 7:

Code:Callback_BootEnvironmentDetect: Detected boot environment: BIOS

Code:Callback_BootEnvironmentDetect: Detected boot environment: UEFI

You may also want to check out the TechNet article on how to deploy Windows 7 to UEFI-based computers.

You may have noticed that most people use EFI and UEFI interchangeably, but the UEFI is a later development and EFI is the old one. If I'm not mistaken it stands for Universal Extendable Firmware Interface. Just don't get confused by this, it usually means the same thing. It may say EFI or UEFI in your motherboard manual, and you need to have it enabled.

8
  • 2
    Thanks. \Windows\Panther, didn't know such a beast was hiding inside my computer. As an alternative to using Notepad, one could use trusty old FINDSTR from the command prompt: findstr Callback_BootEnvironmentDetect \Windows\Panther\setupact.log
    – Lumi
    Jul 12, 2013 at 7:30
  • well put, elaborated answer. +1 Feb 9, 2015 at 10:14
  • 1
    This didn't work for me. The log file was present, but did not contain any Callback_BootEnvironmentDetect message. @EliranMalka's bcdedit solution worked. Using Windows 7 Ultimate x64.
    – aroth
    Jul 7, 2015 at 2:28
  • Works on Windows 10 installer
    – Brian Low
    Jul 16, 2016 at 19:47
  • 1
    This method is really good, it works from both a windows installation DVD, or from windows itself, and works for various versions of windows. The methods others have mentioned like the bcdedit option and the reg query option haven't worked for me from a windows 10 dvd.
    – barlop
    Sep 16, 2020 at 1:23
18

Open a command prompt (as an administrator), and run:

bcdedit /enum

This will enumerate the BCD settings, you'll get an output similar to this one:

Windows Boot Manager
--------------------
identifier              {bootmgr}
device                  partition=\Device\HarddiskVolume1
description             Windows Boot Manager
locale                  en-US
inherit                 {globalsettings}
default                 {current}
resumeobject            {3c6390c7-c6ce-11e1-8e2f-c6d882f2969a}
displayorder            {current}
toolsdisplayorder       {memdiag}
timeout                 30

Windows Boot Loader
-------------------
identifier              {current}
device                  partition=C:
path                    \Windows\system32\winload.exe
description             Windows 7
locale                  en-US
inherit                 {bootloadersettings}
recoverysequence        {3c6390cb-c6ce-11e1-8e2f-c6d882f2969a}
recoveryenabled         Yes
osdevice                partition=C:
systemroot              \Windows
resumeobject            {3c6390c7-c6ce-11e1-8e2f-c6d882f2969a}
nx                      OptIn

Go through the list and look for Windows Boot Loader. If your system is booted in EFI mode, the path value will be \Windows\system32\winload.efi (note the .efi extension - this will revert to .exe otherwise).

Source

http://www.uefi.org/events/UEFI-Plugfest-WindowsBootEnvironment.pdf

2
  • 1
    This is the only method that works if you've manually migrated to UEFI rather than originally installed.
    – Sam Graham
    Dec 3, 2015 at 23:41
  • can get error of "Boot Configuration Data Store Could Not Be Opened" appuals.com/… maybe a possible cause is booting EFI when the partition system is MBR.. So this method doesn't always work
    – barlop
    Sep 16, 2020 at 0:39
3

Now windows 8 and later includes an undocumented environment variable, to check the firmware type system was booted from, that is FIRMWARE_TYPE, to see it use from Cmd:

echo %FIRMWARE_TYPE%

Possible values: UEFI, Legacy, Unknown

1

NOTE: the comment below is about already installed system, not the Windows Installer itself:

Launch Control panel - Administrative tools - Computer management

Check Disk management tab. You should have EFI Encrypted partition (around 100mb). Also, when you right-click your HDD, on the Volumes tab you should see GPT partitioning, (not legacy MBR).

The GPT is part of UEFI package :)

2
  • Hi and Welcome to Super User! Please read the How to Answer a Question Guide. This site is a Q&A site not a forum.
    – slm
    Apr 15, 2013 at 13:50
  • Not entirely correct. The system may have booted using the Compatibility Support Module, where the operating system is installed in a HDD with GPT partition table. So, no, the sole presence of a GPT partition table or an EFI partition doesn't suffice. Feb 19, 2016 at 13:15
1

Microsoft's suggested method is to do a simple registry query. At the command prompt run this command

reg.exe query HKLM\System\CurrentControlSet\Control /v PEFirmwareType

If the returned value is 1 or 0x1 then your PC is running in BIOS mode. If the returned value is 2 or 0x2 then your PC is running in UEFI mode.

https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/boot-to-uefi-mode-or-legacy-bios-mode

2
  • This is useful when you deploy an WIM image from WInPE
    – Gh0sT
    Apr 28, 2020 at 20:11
  • just tried this from a windows 10 installation dvd and it didn't work , there's no such key there of PEFirmwareType i.stack.imgur.com/x4ffN.png
    – barlop
    Sep 16, 2020 at 0:50
0

this link https://itsfoss.com/check-uefi-or-bios/

mentions some methods e.g.

there's a way from bcdedit, if it says winload.exe or if it says winload.efi

(and if one were in windows then msinfo32/system information, lists bios mode, as Legacy or UEFI)

(and if one were in linux, then, if /sys/firmware/efi exists means system uses UEFI. And that link mentions another method from linux too)

a great method mentioned in another answer is to look at X:\Windows\panther\setupact.log if off a DVD, or if off a regular windows installation then `C:\Windows\panther\setupact.log`` and that method is really good because it works from both a windows installation DVD, or from windows itself, and works for various versions of windows. Some other methods like the bcdedit option and the reg query option haven't worked for me from a windows 10 dvd, but that method did.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .