Write a Program in Python/C++ To Test That Computer is Booted With Legacy Boot ROM-BIOS or UEFI. | I'M FROSTY
Make some Money!

What's Hot

recentposts

Write a Program in Python/C++ To Test That Computer is Booted With Legacy Boot ROM-BIOS or UEFI.

============ Python Program ============

import os

print 'UEFI detected.' if os.path.exists('/sys/firmware/efi') else 'Legacy BIOS detected.'
============ OUTPUT ============

# Legacy BIOS detected.

============ C++ Program ============

include windows.h
include iostream
using namespace std;

int main(){ 
        GetFirmwareEnvironmentVariable("", "{00000000-0000-0000-0000-000000000000}", NULL, 0);
        if (GetLastError() == ERROR_INVALID_FUNCTION) {
                cout << endl << "Legacy  BIOS detected.";
        } else{
                cout << endl << "UEFI detected.";
        }
        cin.get();
        return 0;

}

============ OUTPUT ============


# Legacy BIOS detected.
=======================================================
** Note : Operating System Program. 
Write a Program in Python/C++ To Test That Computer is Booted With Legacy Boot ROM-BIOS or UEFI. Reviewed by Hardik Pandya on 12:51:00 AM Rating: 5

No comments:

All Rights Reserved by I'M FROSTY © 2014 - 2016
*The Content Is Copyrighted To & May Not Be Copied / Republished.

Contact Form

Name

Email *

Message *

Powered by Blogger.