C# get bios version from computer and laptop

get bios version computer and laptop Programatically check and get bios version, bios serial number, last release date. Bios inforamtion are loaded in mother board chip, execute query to retrive bios details in ManagementObjectSearcher.
Most important task of bios is to boot windows operation system , diver load and handle system process in both laptop and computer.

Download

Example Source Snippets - GetBios.zip

namespace : System.Management

example:

C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Management.dll

Bios version, serial number and release date


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Management;

namespace GetBios
{    

    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            GetBiosInformation();
        }

        private void GetBiosInformation()
        {
            string relDt = "";
            try
            {
                ManagementObjectSearcher mSearcher = new ManagementObjectSearcher("SELECT SerialNumber, SMBIOSBIOSVersion, ReleaseDate FROM Win32_BIOS");
                ManagementObjectCollection collection = mSearcher.Get();
                foreach (ManagementObject obj in collection)
                {
                    lblBiosSerial.Text = (string)obj["SerialNumber"];
                    lblBiosVersion.Text = (string)obj["SMBIOSBIOSVersion"];
                    relDt = (string)obj["ReleaseDate"];
                    DateTime dt = ManagementDateTimeConverter.ToDateTime(relDt);
                    lblBiosDate.Text = dt.ToString("dd-MMM-yyyy");//date format
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
            }
        }
    }
}

       

Parent Comment shyam Apr 17 2019
bios comment
Reply  Cancel


Child Comment shyam Jun 18 2019
bios comment test
Parent Comment shyam Apr 17 2019
get bios version from computer and laptop
Reply  Cancel


smartsnipps.ecomparefiles.com © 2019, All Rights Reserved | Disclaimer: smartsnipps.eCompareFiles.com is free to use any code snippets without guarantee