Friday, 26 September 2014

Python Program to check if system is Booted with BOIS or UEFI


*********** Execute This code on Windows system **********



#bios.py

def check():
    infile=open("c:\windows\panther\setupact.log","r+");
    available=False
    for line in infile:
        if"Detected boot environment:BIOS" in line:
in line
        available=True
        break
    return available

available=check()
if available:
    print(".......System Boot type : Legacy Boot ROM-BIOS......!!!")
else:
    print(".......System is Booted with UEFI.....")





No comments:

Post a Comment