To find The System Configuration

Sabarimahesh
Posted by Sabarimahesh under C# category on | Points: 40 | Views : 1159
using System.Management;

WqlObjectQuery objectQuery = new WqlObjectQuery("select * from win32_OperatingSystem");
ManagementObjectSearcher searcher = new ManagementObjectSearcher(objectQuery);
string s, os;
foreach (ManagementObject MO in searcher.Get())
{
s = MO["name"].ToString();
string[] split1 = s.Split('|');
os = split1[0];
Console.WriteLine(os);
}

Comments or Responses

Posted by: T.Saravanan on: 3/15/2012 Level:Silver | Status: [Member] [MVP] | Points: 10
Hi,

Kindly post your code inside the code tag.
Posted by: Sabarimahesh on: 3/16/2012 Level:Bronze | Status: [Member] | Points: 10
T.Saravanan

Ya Sure Man..

I'm A starter know..

I'll Correct it

Login to post response