Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
get_CPU_info()
get_net_info()
get_op_info()
get_net2_info()
get_disk_info()
get_disk_2_info()
get_disp_info()
get_bois_info()
get_base_info()
get_PhysicalMemoryy_info()
End Sub
Private Sub get_CPU_info()
Dim info(40) As String
Dim name(40) As String
name(0) = "DeviceID"
name(1) = "ProcessorID"
name(2) = "Manufacturer"
name(3) = "Name"
name(4) = "Description"
name(5) = "UniqueId"
name(6) = "SocketDesignation"
name(7) = "AddressWidth"
name(8) = "DataWidth"
name(9) = "Family"
name(10) = "Level"
name(11) = "Stepping"
name(12) = "MaxClockSpeed"
name(13) = "CurrentClockSpeed"
name(14) = "InstallDate"
name(15) = "PNPDeviceID"
name(16) = "L2CacheSize"
name(17) = "L2CacheSpeed"
name(18) = "L3CacheSize"
name(19) = "L3CacheSpeed"
name(20) = "Architecture "
name(21) = "Availability"
name(22) = "CurrentVoltage"
name(23) = "ProcessorType"
name(24) = "StatusInfo"
name(25) = "UpgradeMethod"
name(26) = "VoltageCaps"
name(27) = "VoltageCaps"
Dim i As Integer
Dim cpu As New System.Management.ManagementObjectSearcher("SELECT * FROM Win32_Processor")
For Each obj1 As System.Management.ManagementObject In cpu.Get
Try
info(0) = obj1("DeviceID")
Catch ex As Exception
info(0) = ""
End Try
Try
info(1) = obj1("ProcessorID").ToString.Trim
Catch ex As Exception
info(1) = ""
End Try
Try
info(2) = obj1("Manufacturer").ToString.Trim
Catch ex As Exception
info(2) = ""
End Try
Try
info(3) = obj1("Name").ToString.Trim
Catch ex As Exception
info(3) = ""
End Try
Try
info(4) = obj1("Description").ToString.Trim
Catch ex As Exception
info(4) = ""
End Try
Try
info(5) = obj1("UniqueId")
Catch ex As Exception
info(5) = ""
End Try
Try
info(6) = obj1("SocketDesignation")
Catch ex As Exception
info(6) = ""
End Try
Try
info(7) = obj1("AddressWidth")
Catch ex As Exception
info(7) = ""
End Try
Try
info(8) = obj1("DataWidth")
Catch ex As Exception
info(8) = ""
End Try
Try
info(9) = obj1("Family")
Catch ex As Exception
info(9) = ""
End Try
Try
info(10) = obj1("Level")
Catch ex As Exception
info(10) = ""
End Try
Try
info(11) = obj1("Stepping")
Catch ex As Exception
info(11) = ""
End Try
Try
info(12) = obj1("MaxClockSpeed")
Catch ex As Exception
info(12) = ""
End Try
Try
info(13) = obj1("CurrentClockSpeed")
Catch ex As Exception
info(13) = ""
End Try
Try
info(14) = obj1("InstallDate")
Catch ex As Exception
info(14) = ""
End Try
Try
info(15) = obj1("PNPDeviceID")
Catch ex As Exception
info(15) = ""
End Try
Try
info(16) = obj1("L2CacheSize")
Catch ex As Exception
info(16) = ""
End Try
Try
info(17) = obj1("L2CacheSpeed")
Catch ex As Exception
info(17) = ""
End Try
Try
info(18) = obj1("L3CacheSize")
Catch ex As Exception
info(18) = ""
End Try
Try
info(19) += obj1("L3CacheSpeed")
Catch ex As Exception
info(19) = ""
End Try
Try
Select Case obj1("Architecture").ToString
Case "0"
info(20) = "x86"
Case "1"
info(20) = "MIPS"
Case "2"
info(20) = "Alpha"
Case "3"
info(20) = "PowerPC"
Case "6"
info(20) = "Intel Itanium Processor Family (IPF)"
Case "9"
info(20) = "x64"
Case Else
info(20) = obj1("Architecture").ToString
End Select
Catch ex As Exception
info(20) = ""
End Try
Try
info(21) = obj1("Availability")
Catch ex As Exception
info(21) = ""
End Try
Try
info(22) = obj1("CurrentVoltage")
Catch ex As Exception
info(22) = ""
End Try
Try
Select Case obj1("ProcessorType")
Case "1"
info(23) = "Other"
Case "2"
info(23) = "Unknown"
Case "3"
info(23) = "Central Processor"
Case "4"
info(23) = "Math Processor"
Case "5"
info(23) = "DSP Processor"
Case "6"
info(23) = "Video Processor"
Case Else
info(23) = obj1("ProcessorType")
End Select
Catch ex As Exception
info(23) = ""
End Try
Try
Select Case obj1("StatusInfo")
Case "1"
info(24) = "Other"
Case "2"
info(24) = "Unknown"
Case "3"
info(24) = "Enabled"
Case "4"
info(24) = "Disabled"
Case "5"
info(24) = "Not Applicable"
Case Else
info(24) = obj1("StatusInfo")
End Select
Catch ex As Exception
info(24) = ""
End Try
Try
Select Case obj1("UpgradeMethod").ToString
Case "1"
info(25) = "Other"
Case "2"
info(25) = "Unknown"
Case "3"
info(25) = "Daughter Board"
Case "4"
info(25) = "ZIF Socket"
Case "5"
info(25) = "Replacement/Piggy Back"
Case "6"
info(25) = "None"
Case "7"
info(25) = "LIF Socket"
Case "8"
info(25) = "Slot 1"
Case "9"
info(25) = "Slot 2"
Case "10"
info(25) = "370 Pin Socket"
Case "11"
info(25) = "Slot A"
Case "12"
info(25) = "Slot M"
Case "13"
info(25) = "Socket 423"
Case "14"
info(25) = "Socket A (Socket 462)"
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
get_CPU_info()
get_net_info()
get_op_info()
get_net2_info()
get_disk_info()
get_disk_2_info()
get_disp_info()
get_bois_info()
get_base_info()
get_PhysicalMemoryy_info()
End Sub
Private Sub get_CPU_info()
Dim info(40) As String
Dim name(40) As String
name(0) = "DeviceID"
name(1) = "ProcessorID"
name(2) = "Manufacturer"
name(3) = "Name"
name(4) = "Description"
name(5) = "UniqueId"
name(6) = "SocketDesignation"
name(7) = "AddressWidth"
name(8) = "DataWidth"
name(9) = "Family"
name(10) = "Level"
name(11) = "Stepping"
name(12) = "MaxClockSpeed"
name(13) = "CurrentClockSpeed"
name(14) = "InstallDate"
name(15) = "PNPDeviceID"
name(16) = "L2CacheSize"
name(17) = "L2CacheSpeed"
name(18) = "L3CacheSize"
name(19) = "L3CacheSpeed"
name(20) = "Architecture "
name(21) = "Availability"
name(22) = "CurrentVoltage"
name(23) = "ProcessorType"
name(24) = "StatusInfo"
name(25) = "UpgradeMethod"
name(26) = "VoltageCaps"
name(27) = "VoltageCaps"
Dim i As Integer
Dim cpu As New System.Management.ManagementObjectSearcher("SELECT * FROM Win32_Processor")
For Each obj1 As System.Management.ManagementObject In cpu.Get
Try
info(0) = obj1("DeviceID")
Catch ex As Exception
info(0) = ""
End Try
Try
info(1) = obj1("ProcessorID").ToString.Trim
Catch ex As Exception
info(1) = ""
End Try
Try
info(2) = obj1("Manufacturer").ToString.Trim
Catch ex As Exception
info(2) = ""
End Try
Try
info(3) = obj1("Name").ToString.Trim
Catch ex As Exception
info(3) = ""
End Try
Try
info(4) = obj1("Description").ToString.Trim
Catch ex As Exception
info(4) = ""
End Try
Try
info(5) = obj1("UniqueId")
Catch ex As Exception
info(5) = ""
End Try
Try
info(6) = obj1("SocketDesignation")
Catch ex As Exception
info(6) = ""
End Try
Try
info(7) = obj1("AddressWidth")
Catch ex As Exception
info(7) = ""
End Try
Try
info(8) = obj1("DataWidth")
Catch ex As Exception
info(8) = ""
End Try
Try
info(9) = obj1("Family")
Catch ex As Exception
info(9) = ""
End Try
Try
info(10) = obj1("Level")
Catch ex As Exception
info(10) = ""
End Try
Try
info(11) = obj1("Stepping")
Catch ex As Exception
info(11) = ""
End Try
Try
info(12) = obj1("MaxClockSpeed")
Catch ex As Exception
info(12) = ""
End Try
Try
info(13) = obj1("CurrentClockSpeed")
Catch ex As Exception
info(13) = ""
End Try
Try
info(14) = obj1("InstallDate")
Catch ex As Exception
info(14) = ""
End Try
Try
info(15) = obj1("PNPDeviceID")
Catch ex As Exception
info(15) = ""
End Try
Try
info(16) = obj1("L2CacheSize")
Catch ex As Exception
info(16) = ""
End Try
Try
info(17) = obj1("L2CacheSpeed")
Catch ex As Exception
info(17) = ""
End Try
Try
info(18) = obj1("L3CacheSize")
Catch ex As Exception
info(18) = ""
End Try
Try
info(19) += obj1("L3CacheSpeed")
Catch ex As Exception
info(19) = ""
End Try
Try
Select Case obj1("Architecture").ToString
Case "0"
info(20) = "x86"
Case "1"
info(20) = "MIPS"
Case "2"
info(20) = "Alpha"
Case "3"
info(20) = "PowerPC"
Case "6"
info(20) = "Intel Itanium Processor Family (IPF)"
Case "9"
info(20) = "x64"
Case Else
info(20) = obj1("Architecture").ToString
End Select
Catch ex As Exception
info(20) = ""
End Try
Try
info(21) = obj1("Availability")
Catch ex As Exception
info(21) = ""
End Try
Try
info(22) = obj1("CurrentVoltage")
Catch ex As Exception
info(22) = ""
End Try
Try
Select Case obj1("ProcessorType")
Case "1"
info(23) = "Other"
Case "2"
info(23) = "Unknown"
Case "3"
info(23) = "Central Processor"
Case "4"
info(23) = "Math Processor"
Case "5"
info(23) = "DSP Processor"
Case "6"
info(23) = "Video Processor"
Case Else
info(23) = obj1("ProcessorType")
End Select
Catch ex As Exception
info(23) = ""
End Try
Try
Select Case obj1("StatusInfo")
Case "1"
info(24) = "Other"
Case "2"
info(24) = "Unknown"
Case "3"
info(24) = "Enabled"
Case "4"
info(24) = "Disabled"
Case "5"
info(24) = "Not Applicable"
Case Else
info(24) = obj1("StatusInfo")
End Select
Catch ex As Exception
info(24) = ""
End Try
Try
Select Case obj1("UpgradeMethod").ToString
Case "1"
info(25) = "Other"
Case "2"
info(25) = "Unknown"
Case "3"
info(25) = "Daughter Board"
Case "4"
info(25) = "ZIF Socket"
Case "5"
info(25) = "Replacement/Piggy Back"
Case "6"
info(25) = "None"
Case "7"
info(25) = "LIF Socket"
Case "8"
info(25) = "Slot 1"
Case "9"
info(25) = "Slot 2"
Case "10"
info(25) = "370 Pin Socket"
Case "11"
info(25) = "Slot A"
Case "12"
info(25) = "Slot M"
Case "13"
info(25) = "Socket 423"
Case "14"
info(25) = "Socket A (Socket 462)"