Operating System Info :
ConnectionOptions co = new ConnectionOptions();
//co.Username = "remoteUsername";//Only For Remote Machine
//co.Password = "remotePassword";//Only For Remote Machine
//For Local Machine ( leave them )
string machineName = "localhost"; // or the IP of the remote machime
ManagementScope ms = new ManagementScope("\\\\"+machineName+"\\root\\cimv2",co);
ObjectQuery oq = new ObjectQuery("SELECT * FROM Win32_OperatingSystem");
ManagementObjectSearcher mos = new ManagementObjectSearcher(ms,oq);
ManagementObjectCollection queryCollection = mos.Get();
foreach ( ManagementObject mo in queryCollection)
{
MessageBox.Show("Operating System: " + mo["Caption"]);
MessageBox.Show("Version: " + mo["Version"]);
MessageBox.Show("Manufacturer : " + mo["Manufacturer"]);
MessageBox.Show("Computer Name : " +mo["csname"]);
MessageBox.Show("Windows Directory : " + mo["WindowsDirectory"]);
MessageBox.Show("Serial Number : " + mo["SerialNumber"]);
}Computer System Info
ConnectionOptions co = new ConnectionOptions();
//co.Username = "remoteUsername";//Only For Remote Machine
//co.Password = "remotePassword";//Only For Remote Machine
//For Local Machine ( leave them )
string machineName = "localhost"; // or the IP of the remote machime
ManagementScope ms = new ManagementScope("\\\\"+machineName+"\\root\\cimv2",co);
ObjectQuery oq = new ObjectQuery("SELECT * FROM Win32_ComputerSystem");
ManagementObjectSearcher mos = new ManagementObjectSearcher(ms,oq);
ManagementObjectCollection queryCollection = mos.Get();
foreach ( ManagementObject mo in queryCollection)
{
MessageBox.Show("Computer Manufacturer Name: " + mo["Manufacturer"]);
MessageBox.Show("Computer Model: " + mo["model"]);
MessageBox.Show("System Type: " + mo["SystemType"]);
MessageBox.Show("Total Physical Memory: " + mo["totalphysicalmemory"]);
MessageBox.Show("Domain: " + mo["Domain"]);
MessageBox.Show("User Name: " + mo["UserName"]);
}Processor Info
ConnectionOptions co = new ConnectionOptions();
//co.Username = "remoteUsername";//Only For Remote Machine
//co.Password = "remotePassword";//Only For Remote Machine
//For Local Machine ( leave them )
string machineName = "localhost"; // or the IP of the remote machime
ManagementScope ms = new ManagementScope("\\\\"+machineName+"\\root\\cimv2",co);
ObjectQuery oq = new ObjectQuery("SELECT * FROM Win32_processor");
ManagementObjectSearcher mos = new ManagementObjectSearcher(ms,oq);
ManagementObjectCollection queryCollection = mos.Get();
foreach ( ManagementObject mo in queryCollection)
{
MessageBox.Show("Manufacturer: " + mo["Manufacturer"]);
MessageBox.Show("Computer Processor: " + mo["Caption"]);
MessageBox.Show("CPU Speed: " + mo["MaxClockSpeed"]);
MessageBox.Show("L2 Cache Size: " + mo["L2CacheSize"]);
}Bios Info
ConnectionOptions co = new ConnectionOptions();
//co.Username = "remoteUsername";//Only For Remote Machine
//co.Password = "remotePassword";//Only For Remote Machine
//For Local Machine ( leave them )
string machineName = "localhost"; // or the IP of the remote machime
ManagementScope ms = new ManagementScope("\\\\"+machineName+"\\root\\cimv2",co);
ObjectQuery oq = new ObjectQuery("SELECT * FROM Win32_bios");
ManagementObjectSearcher mos = new ManagementObjectSearcher(ms,oq);
ManagementObjectCollection queryCollection = mos.Get();
foreach ( ManagementObject mo in queryCollection)
{
MessageBox.Show("BIOS: " + mo["Caption"]);
MessageBox.Show("BIOS Version: " + mo["version"]);
}Time Zone
ConnectionOptions co = new ConnectionOptions();
//co.Username = "remoteUsername";//Only For Remote Machine
//co.Password = "remotePassword";//Only For Remote Machine
//For Local Machine ( leave them )
string machineName = "localhost"; // or the IP of the remote machime
ManagementScope ms = new ManagementScope("\\\\"+machineName+"\\root\\cimv2",co);
ObjectQuery oq = new ObjectQuery("SELECT * FROM Win32_timezone");
ManagementObjectSearcher mos = new ManagementObjectSearcher(ms,oq);
ManagementObjectCollection queryCollection = mos.Get();
foreach ( ManagementObject mo in queryCollection)
{
MessageBox.Show("Time Zone: " + mo["Caption"]);
}Memory Configuration
ConnectionOptions co = new ConnectionOptions();
//co.Username = "remoteUsername";//Only For Remote Machine
//co.Password = "remotePassword";//Only For Remote Machine
//For Local Machine ( leave them )
string machineName = "localhost"; // or the IP of the remote machime
ManagementScope ms = new ManagementScope("\\\\"+machineName+"\\root\\cimv2",co);
ObjectQuery oq = new ObjectQuery("SELECT * FROM Win32_LogicalMemoryConfiguration");
ManagementObjectSearcher mos = new ManagementObjectSearcher(ms,oq);
ManagementObjectCollection queryCollection = mos.Get();
foreach ( ManagementObject mo in queryCollection)
{
MessageBox.Show("Total Page File Space: " + mo["TotalPageFileSpace"]);
MessageBox.Show("Total Virtual Memory: "+mo["TotalVirtualMemory"]);
MessageBox.Show("Total Physical Memory: "+ mo["TotalPhysicalMemory"]);
}Network Connection
ConnectionOptions co = new ConnectionOptions();
//co.Username = "remoteUsername";//Only For Remote Machine
//co.Password = "remotePassword";//Only For Remote Machine
//For Local Machine ( leave them )
string machineName = "localhost"; // or the IP of the remote machime
ManagementScope ms = new ManagementScope("\\\\"+machineName+"\\root\\cimv2",co);
ObjectQuery oq = new ObjectQuery("SELECT * FROM Win32_NetworkConnection");
ManagementObjectSearcher mos = new ManagementObjectSearcher(ms,oq);
ManagementObjectCollection queryCollection = mos.Get();
foreach ( ManagementObject mo in queryCollection)
{
MessageBox.Show("Name: " + mo["Name"]);
}Video Controller
ConnectionOptions co = new ConnectionOptions();
//co.Username = "remoteUsername";//Only For Remote Machine
//co.Password = "remotePassword";//Only For Remote Machine
//For Local Machine ( leave them )
string machineName = "localhost"; // or the IP of the remote machime
ManagementScope ms = new ManagementScope("\\\\"+machineName+"\\root\\cimv2",co);
ObjectQuery oq = new ObjectQuery("SELECT * FROM Win32_VideoController");
ManagementObjectSearcher mos = new ManagementObjectSearcher(ms,oq);
ManagementObjectCollection queryCollection = mos.Get();
foreach ( ManagementObject mo in queryCollection)
{
MessageBox.Show("Name: " + mo["Name"]);
MessageBox.Show("Processor: " + mo["VideoProcessor"]);
MessageBox.Show("Mode: " + mo["VideoModeDescription"]);
MessageBox.Show("Video Ram: " + mo["AdapterRAM"]);
MessageBox.Show("PNP Device ID: " + mo["PNPDeviceID"]);
MessageBox.Show("Status: " + mo["Status"]);
}