Windows management Instrumentation...
Win32-Operating System
CSName,Caption,Windows directory,serialno,registered user,no of processes
Win32-Bios
Version,name,manufacturer,serialnumber,release date,current language,primary bios,status
Win32-ComputerSystem
Manufacturer,username,totalphysicalmemory,system type,model
Win32-Processor
Caption,Current Clock Speed
Win32-TimeZone
Caption
Win32-CDROMDrive
Caption,mediatype,drive,manufacturer,description
Win32-Account
Name,description,domain,sid
Win32-DiskDrive
Caption,deviceid,index,partitions
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Management;
namespace WindowsFormsApplication1
{
public partial class WMI : Form
{
public WMI()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
SelectQuery query = new SelectQuery("Win32OperatingSystem");
ManagementObjectSearcher search = new ManagementObjectSearcher(query);
foreach (ManagementObject mobj in search.Get())
{
MessageBox.Show(mobj["CSname"].ToString());
}
}
private void WMI_Load(object sender, EventArgs e)
{
}
}
}
Category: windows