Windows management Instrumentation...

Unknown | 12:53 AM |

WMI is a set of extensions to the windows drives model that provides an opertaing system interface through which instrumental components provide information and notification.Microsoft also provides a command line interface to WMI called Windows Management Instrumentation Command Line(WMIC)
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:

About http://dotnetvisual.blogspot.in/:
DOT NET TO ASP.NET is a web application framework marketed by Microsoft that programmers can use to build dynamic web sites, web applications and web services. It is part of Microsoft's .NET platform and is the successor to Microsoft's Active Server Pages (ASP) technology. ASP.NET is built on the Common Language Runtime, allowing programmers to write ASP.NET code using any Microsoft .NET language. create an application very easily ....