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

HTML Image

IMFROSTY

Whats Hot ?

This Domain Name is for Sale !! Please contact Admin : pandyanhardik@gmail.com, If you are interested to buy it..

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 - 2017
*The Content Is Copyrighted To & May Not Be Copied / Republished.

Biểu mẫu liên hệ

Name

Email *

Message *

Powered by Blogger.