Exception when reading BIOS information - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Exception when reading BIOS information

alexschunkalexschunk Posts: 4Member

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 = "";

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.
Sign In or Register to comment.