Windows XP

Moderators: None (Apply to moderate this forum)
Number of threads: 168
Number of posts: 271

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Exception when reading BIOS information Posted by alexschunk on 22 Dec 2008 at 3:31 AM
Hello,

i got an Exception when i try to read some BIOS informaiton with WMI using C#.

I have the following code:

public static string GetBIOSBuildName()
{
string name = "";
try
{

ManagementObjectSearcher query = new ManagementObjectSearcher("SELECT * FROM Win32_bios");
ManagementObjectCollection qCollection = query.Get();
foreach (ManagementObject mo in qCollection)
{
if (name == null)
{
name = mo["BuildName"].ToString();
}
}
}
catch (Exception e)
{
return "error";
}
return name;
}

It looks like i cannot read the BuildNumber and some other information but i can read BuildVersion, Caption and Language.

Do i need some other code for reading BuildNumber etc?

Thank you.
Thread Tree
alexschunk Exception when reading BIOS information on 22 Dec 2008 at 3:31 AM



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.