http://msdn.microsoft.com/msdnmag/issues/02/05/WMIMan/
An article demostrating what you want:
http://www.codeproject.com/vbscript/VvvHardwareInfo.asp
HTH
Ollie Riches
"sonu" <kr_a...@yahoo.com> wrote in message
news:1126209128....@g47g2000cwa.googlegroups.com...
Try the followin classes and links below to further research over this.
Driveinfo,Getdrives, Getdriveinfo,Drivetype etc..
(1) http://msdn2.microsoft.com/en-us/library/0fxtk2z5
(2) http://msdn2.microsoft.com/en-us/library/k22c1a85(en-us,vs.80).aspx
Hope this will atleast start your search :)
Maheshkumar.R
http://spaces.msn.com/members/cyberiafreak
"sonu" <kr_a...@yahoo.com> wrote in message
news:1126209128....@g47g2000cwa.googlegroups.com...
http://www.codeproject.com/vbscript/VvvHardwareInfo.asp
Ollie Riches
"sonu" <kr_a...@yahoo.com> wrote in message
news:1126276771.0...@g49g2000cwa.googlegroups.com...
Is there any method in System.Management for getting the information
about RAM,and CPU
ObjectQuery objectQuery = new ObjectQuery("select * from
Win32_Processor");
ManagementObjectSearcher searcher =
new
ManagementObjectSearcher(objectQuery);
foreach (ManagementObject share in
searcher.Get())
{
Response.Write("Share = " +
share["Name"]);
}
Above code is return the information about CPU by using the sql
select * from Win32_Processor
How to find RAM or full hardware information i dont know..
Please Help me
static void Main(string[] args)
{
double totalCapacity = 0;
ObjectQuery objectQuery = new ObjectQuery("select * from
Win32_PhysicalMemory");
ManagementObjectSearcher searcher = new
ManagementObjectSearcher(objectQuery);
ManagementObjectCollection vals = searcher.Get();
foreach(ManagementObject val in vals)
{
totalCapacity += System.Convert.ToDouble(val.GetPropertyValue("Capacity"));
}
Console.WriteLine("Total Machine Memory = " + totalCapacity.ToString() + "
Bytes");
Console.WriteLine("Total Machine Memory = " + (totalCapacity / 1024) + "
KiloBytes");
Console.WriteLine("Total Machine Memory = " + (totalCapacity / 1048576) + "
MegaBytes");
Console.WriteLine("Total Machine Memory = " + (totalCapacity / 1073741824 )
+ " GigaBytes");
Console.ReadLine();
}
HTH
Ollie Riches
"sonu" <kr_a...@yahoo.com> wrote in message
news:1126278300.7...@f14g2000cwb.googlegroups.com...
Its working fine, thank you very much