E
esparkman
Hey guys I am working on a application, that will pull our inventory
campus wide. I'm having troubles getting it to pull our software serial
numbers. It keeps throwing a Exception when it gets to that point.
Below is the code I am using. If someone could give me a few ideas. The
app is in Console form now to be translated to a Windows App at a
future date.
query1 = new ManagementObjectSearcher("SELECT * FROM Win32_Product");
queryCollection1 = query1.Get();
foreach (ManagementObject mo in queryCollection1)
{
Console.WriteLine("Product : " +
mo["Name"].ToString());
Console.WriteLine("Serial : " +
mo["ProductID"].ToString());
}
Thanks-
Evan Sparkman
campus wide. I'm having troubles getting it to pull our software serial
numbers. It keeps throwing a Exception when it gets to that point.
Below is the code I am using. If someone could give me a few ideas. The
app is in Console form now to be translated to a Windows App at a
future date.
query1 = new ManagementObjectSearcher("SELECT * FROM Win32_Product");
queryCollection1 = query1.Get();
foreach (ManagementObject mo in queryCollection1)
{
Console.WriteLine("Product : " +
mo["Name"].ToString());
Console.WriteLine("Serial : " +
mo["ProductID"].ToString());
}
Thanks-
Evan Sparkman