Here is my scenario:
I have a server with 2 possible configurations: 2-TB HDD which require no special treatment or 3-TB HDD that require a UEFI BIOS and a GPT partition to boot the OS.
I am trying to create a single installation USB key that is able to detect whether the BIOS is 'legacy' or 'UEFI' and execute a deployment script accordingly.
I looked hard for a WMI that can make the distinction but to no avail.
The closest that I came to a solution is this post: http://social.technet.microsoft.com/Forums/en-US/winserverManagement/thread/6cbb488d-3062-4aad-b712-7a9e4d045b13
detectefi.exe works perfectly in detecting the BIOS type, but I can't output its result so I don't know how to use it.
I have 2 questions:
is there any WMI that I can use to distinguich between my 2 set-ups.
(if the answer for question 1 is no) is there a way to output the results from a C++ compiled .exe file to .txt or any other form and make use of the result (I have no C++ skills at all)
If anyone is interested how I fixed the problem. I just created a vbs linking to the .exe