Click here to Skip to main content
16,020,622 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
HI Experts,

I want to get the BIOS date in my project.Inspite of change in the date from the "Date and Time Properties" the date that i want is the date in the BIOS.
Posted

1 solution

You can quety WMI with System.Management Namespace

Here is an example. ReleaseDate property is what you are looking for

private void Form1_Load(object sender, EventArgs e)<br />        {<br />            List("Select * from Win32_BIOS");<br />        }<br /><br />        private void List(string query)<br />        {<br />            ManagementObjectSearcher m = new ManagementObjectSearcher();<br />            m.Query = new ObjectQuery(query);<br />            foreach (ManagementObject mo in m.Get())<br />            {<br />                foreach (PropertyData pd in mo.Properties)<br />                {<br />                    if (mo[pd.Name] != null)<br />                    {<br />                        if (mo[pd.Name] is string[])<br />                        {<br />                            foreach (string s in (string[])mo[pd.Name])<br />                            {<br />                                MessageBox.Show(s);<br />                            }<br />                        }<br />                        else<br />                        {<br />                            MessageBox.Show(pd.Name + ":" + mo[pd.Name].ToString());<br />                        }<br />                    }<br />                }<br />            }<br />        }
 
Share this answer
 


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900