How to use WMI to query to distinguish legacy and UEFI mode Windows?

Proposed Answer How to use WMI to query to distinguish legacy and UEFI mode Windows?

  • Thursday, April 28, 2011 5:59 PM
     
     
    How to use WMI to query to distinguish legacy and UEFI mode Windows?

All Replies

  • Friday, April 29, 2011 2:06 AM
     
     

    This document covers requirements for UEFI support.

    http://msdn.microsoft.com/en-us/windows/hardware/gg463144.aspx

    One of the requirements seems to be ACPI. The Win32_BIOS class of WMI has a BIOSCharacteristics property that indicates if ACPI is supported. See this link for properties exposed by Win32_BIOS:

    http://msdn.microsoft.com/en-us/library/aa394077(v=VS.85).aspx

    There is a PowerShell example showing how to get this information at the bottom. You will need to study the document in the first link to see what else is required.

     


    Richard Mueller - MVP Directory Services
  • Monday, May 02, 2011 5:25 PM
     
     

    Hello,

    Maybe I didn't make my question clear. My motherboard BIOS is UEFI BIOS but it supports Legacy Mode.

    I can install UEFI Mode Win2K8 R2 and x64 Win7, and I can isntall regular Legacy Mode Windows also.

    i want to know how to use WMI to query to distinguish Windows installed in Legacy and UEFI mode?
  • Tuesday, August 02, 2011 1:37 PM
     
     

    Superman,


    Did you ever figure this out?  I have a need to do the same thing.

     

     

  • Wednesday, September 21, 2011 7:39 PM
     
     Proposed Answer

    I don't have an answer through WMI, but I did write a utility I could use in WinPE to see if the system executing the binary is UEFI or not.

    Binary:

    http://xcat.svn.sourceforge.net/svnroot/xcat/xcat-core/trunk/xCAT-server/share/xcat/netboot/windows/detectefi.exe

    Source:

    http://xcat.svn.sourceforge.net/svnroot/xcat/xcat-core/trunk/xCAT-server/share/xcat/netboot/windows/detectefi.cpp

    I know I came looking here for *any* way and assumed WMI was the most likely candidate in a WinPE environment, but this is what I came up with.

  • Monday, May 07, 2012 3:51 PM
     
     

    Thanks for the UEFI file.
    now, if you wish to use it from Microsoft Deployment Toolkit 2010 check out this link:
    http://blogs.microsoft.co.il/blogs/agile/archive/2012/05/06/uefidetectmdt2010.aspx

    enjoy :)


    Tamir Levy