Has anyone found a good way to detect whether a machine is running UEFI or bios then have a provisioning template apple the correct image via imagew? I am looking for a way that a non technical users can just F12 boot a machine choose the anonymous logon, choose a single template then have the template just work from their perspective. I have looked at the mini scan that a new machine returns to the core, but there is no information in that would allow the template to branch accordingly with if statements. I am trying this with LDMS16 update 3. I appreciate any thoughts or feedback on this. Thanks
I can't give you definitive info - but I'm wondering if you shouldn't be able to hit up PowerShell / query WMI in the WinPE image to tell you for certain?
Might require some researching - but if I'm not entirely wrong, hopefully you should be able to get a fairly simple case of "if UEFI - do X / if BIOS - do Y" type PS script (or VB-script querying WMI) ...?
May want to trawl through what you get on the two types of boxes with a WMI browser in Win 10 PE ... *fingers crossed* ?
From my limited experience with LDMS2016 (coming from a 9.0.2 swing migration upgrade...) the easiest way to detect whether it is the UEFI or BIOS is by the version of the WinPE that is booted: it is x86 (32-bit) for BIOS-based computers, whereas it is AMD64 (64-bit WinPE) for UEFI devices.
This can be checked via the %PROCESSOR_ARCHITECTURE% environment variable (or %%PROCESSOR_ARCHITECTURE%% in a provisioning template). I too would like one image option per-OS version, but have not (yet) found a bombproof way of getting the Conditional Statements (IF ELSE) to work with a system environment variable, rather than a LANDesk variable/database value.
I used to use imagew until UEFI bios were released. It is much easier to use imagex (wim) now instead as the default partition action of 'create default partitions' and this is smart enough to know which type of BIOS is enabled and partition accordingly for MBR or GPT. You can then apply the same wim image no matter which BIOS so means you have a single template for both scenarios.
I had basically the same issue. i suppose that your users boot in PXE. In this case the detection as proposed by carlos will always show 32bit and thus BIOS.
For getting round this, I wrote a wizard that asks the user if he wants to use UEFI or BIOS. In function of the answer the template chooses what script to apply.