示例#1
0
 public static void Get_Win32_BIOS()
 {
     try
     {
         using (ManagementClass mc = new ManagementClass("Win32_BIOS"))
         {
             ManagementObjectCollection moc = mc.GetInstances();
             foreach (ManagementObject mo in moc)
             {
                 BIOS_BIOSVersion           = Modfunction.CheckNull(mo.Properties["BIOSVersion"].Value).ToString();           // "InsydeH2O Version 03.71.48V1.07" Array
                 BIOS_Caption               = Modfunction.CheckNull(mo.Properties["Caption"].Value).ToString();               // "InsydeH2O Version 03.71.48V1.07"
                 BIOS_Description           = Modfunction.CheckNull(mo.Properties["Description"].Value).ToString();           // "InsydeH2O Version 03.71.48V1.07"
                 BIOS_Manufacturer          = Modfunction.CheckNull(mo.Properties["Manufacturer"].Value).ToString();          // "Acer"
                 BIOS_Name                  = Modfunction.CheckNull(mo.Properties["Name"].Value).ToString();                  // "InsydeH2O Version 03.71.48V1.07"
                 BIOS_ReleaseDate           = Modfunction.CheckNull(mo.Properties["ReleaseDate"].Value).ToString();           // "20120511000000.000000+000"
                 BIOS_SerialNumber          = Modfunction.CheckNull(mo.Properties["SerialNumber"].Value).ToString();          // "NXRZGSG00222809DEA3400"
                 BIOS_SMBIOSBIOSVersion     = Modfunction.CheckNull(mo.Properties["SMBIOSBIOSVersion"].Value).ToString();     // "V1.07"
                 BIOS_SoftwareElementID     = Modfunction.CheckNull(mo.Properties["SoftwareElementID"].Value).ToString();     // "InsydeH2O Version 03.71.48V1.07"
                 BIOS_TargetOperatingSystem = Modfunction.CheckNull(mo.Properties["TargetOperatingSystem"].Value).ToString(); // 0 - Unknown
                 BIOS_Version               = Modfunction.CheckNull(mo.Properties["Version"].Value).ToString();               // "ACRSYS - 1"
             }
         }
     }
     catch (Exception ex)
     {
         Log.Debug(ex.Message.ToString(), ex);
     }
     finally { }
 }
示例#2
0
 public static void Get_Win32_PhysicalMemory()
 {
     try
     {
         ManagementClass            mc  = new ManagementClass("Win32_PhysicalMemory");
         ManagementObjectCollection moc = mc.GetInstances();
         foreach (ManagementObject mo in moc)
         {
             PhysicalMemory_Capacity        = Modfunction.CheckNull(mo.Properties["Capacity"].Value).ToString();     // 4294967296 Kilobytes
             PhysicalMemory_Description     = Modfunction.CheckNull(mo.Properties["Description"].Value).ToString();  // "Physical Memory"
             PhysicalMemory_DataWidth       = Modfunction.CheckNull(mo.Properties["DataWidth"].Value).ToString();    // 64
             PhysicalMemory_FormFactor      = Modfunction.CheckNull(mo.Properties["FormFactor"].Value).ToString();   // 8 - DIMM
             PhysicalMemory_Manufacturer    = Modfunction.CheckNull(mo.Properties["Manufacturer"].Value).ToString(); // "Kingston"
             PhysicalMemory_MemoryType      = Modfunction.CheckNull(mo.Properties["MemoryType"].Value).ToString();   // 0 - Unknown
             PhysicalMemory_PartNumber      = Modfunction.CheckNull(mo.Properties["PartNumber"].Value).ToString();   // "9905428-073.A00LF "
             PhysicalMemory_SerialNumber    = Modfunction.CheckNull(mo.Properties["SerialNumber"].Value).ToString(); // "CD04E88A"
             PhysicalMemory_Speed           = Modfunction.CheckNull(mo.Properties["Speed"].Value).ToString();        // 666 - nanoseconds
             PhysicalMemory_TotalWidth      = Modfunction.CheckNull(mo.Properties["TotalWidth"].Value).ToString();   // 64
             PhysicalMemory_TypeDetail      = Modfunction.CheckNull(mo.Properties["TypeDetail"].Value).ToString();   // 128 - Synchronous
             PhysicalMemory_Capacity_Total += long.Parse(PhysicalMemory_Capacity, System.Globalization.NumberFormatInfo.InvariantInfo);
         }
     }
     catch (Exception ex)
     {
         Log.Debug(ex.Message.ToString(), ex);
     }
     finally { }
 }
示例#3
0
 public static void Get_Win32_Processor()
 {
     try
     {
         ManagementClass            mc  = new ManagementClass("Win32_Processor");
         ManagementObjectCollection moc = mc.GetInstances();
         foreach (ManagementObject mo in moc)
         {
             cpu_Version                   = Modfunction.CheckNull(mo.Properties["Version"].Value).ToString();
             cpu_AddressWidth              = Modfunction.CheckNull(mo.Properties["AddressWidth"].Value).ToString();
             cpu_Name                      = Modfunction.CheckNull(mo.Properties["Name"].Value).ToString();                      // Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz
             cpu_Manufacturer              = Modfunction.CheckNull(mo.Properties["Manufacturer"].Value).ToString();              // GenuineIntel
             cpu_ProcessorId               = Modfunction.CheckNull(mo.Properties["ProcessorId"].Value).ToString();               // BFEBFBFF000306A9
             cpu_ProcessorType             = Modfunction.CheckNull(mo.Properties["ProcessorType"].Value).ToString();             // Central Processor
             cpu_MaxClockSpeed             = Modfunction.CheckNull(mo.Properties["MaxClockSpeed"].Value).ToString();             // 2501 MegaHertz
             cpu_CurrentClockSpeed         = Modfunction.CheckNull(mo.Properties["CurrentClockSpeed"].Value).ToString();         // 2501 MegaHertz
             cpu_Description               = Modfunction.CheckNull(mo.Properties["Description"].Value).ToString();               // Intel64 Family 6 Model 58 Stepping 9
             cpu_Family                    = Modfunction.CheckNull(mo.Properties["Family"].Value).ToString();                    // 198
             cpu_L2CacheSize               = Modfunction.CheckNull(mo.Properties["L2CacheSize"].Value).ToString();               // 256 Kilobytes
             cpu_L2CacheSpeed              = Modfunction.CheckNull(mo.Properties["L2CacheSpeed"].Value).ToString();              //null MegaHertz
             cpu_L3CacheSize               = Modfunction.CheckNull(mo.Properties["L3CacheSize"].Value).ToString();               // 3072 Kilobytes (Windows Server 2003 and Windows XP:  This property is not available.)
             cpu_L3CacheSpeed              = Modfunction.CheckNull(mo.Properties["L3CacheSpeed"].Value).ToString();              //null MegaHertz (Windows Server 2003 and Windows XP:  This property is not available.)
             cpu_NumberOfCores             = Modfunction.CheckNull(mo.Properties["NumberOfCores"].Value).ToString();             // 2
             cpu_NumberOfLogicalProcessors = Modfunction.CheckNull(mo.Properties["NumberOfLogicalProcessors"].Value).ToString(); // 4
         }
     }
     catch (Exception ex)
     {
         Log.Debug(ex.Message.ToString(), ex);
     }
     finally { }
 }
示例#4
0
 public static void Get_Win32_BaseBoard()
 {
     try
     {
         using (ManagementClass mc = new ManagementClass("Win32_BaseBoard"))
         {
             ManagementObjectCollection moc = mc.GetInstances();
             foreach (ManagementObject mo in moc)
             {
                 basebord_Name         = Modfunction.CheckNull(mo.Properties["Name"].Value).ToString();         // "Base Board"
                 basebord_Manufacturer = Modfunction.CheckNull(mo.Properties["Manufacturer"].Value).ToString(); // "Acer"
                 basebord_Product      = Modfunction.CheckNull(mo.Properties["Product"].Value).ToString();      // "VA50_HC_CR"
                 basebord_SerialNumber = Modfunction.CheckNull(mo.Properties["SerialNumber"].Value).ToString(); // "NBY111100122826DFA3400"
                 basebord_Version      = Modfunction.CheckNull(mo.Properties["Version"].Value).ToString();      // "Type2 - Board Version"
             }
         }
     }
     catch (Exception ex)
     {
         Log.Debug(ex.Message.ToString(), ex);
     }
     finally { }
 }