Public Class MotherBoard
Dim con As ConnectionOptions = New ConnectionOptions
Dim machineName As String = System.Environment.MachineName
Dim mss As ManagementScope = New ManagementScope("\\" + machineName + "\root\cimv2", con)
Dim ob As ObjectQuery = New ObjectQuery("SELECT * FROM Win32_MotherboardDevice")
Dim moss As ManagementObjectSearcher = New ManagementObjectSearcher(mss, ob)
Dim queryCollection As ManagementObjectCollection = moss.Get
Public Function Caption()
For Each getnow As ManagementObject In queryCollection
Caption = getnow("Caption")
Next
End Function
Public Function PrimaryBusType()
For Each getnow As ManagementObject In queryCollection
PrimaryBusType = getnow("PrimaryBusType")
Next
End Function
Public Function SecondaryBusType()
For Each getnow As ManagementObject In queryCollection
SecondaryBusType = getnow("SecondaryBusType")
Next
End Function
End Class
Please SUBSCRIBE to get new articles directly into your Email inbox!
Dim con As ConnectionOptions = New ConnectionOptions
Dim machineName As String = System.Environment.MachineName
Dim mss As ManagementScope = New ManagementScope("\\" + machineName + "\root\cimv2", con)
Dim ob As ObjectQuery = New ObjectQuery("SELECT * FROM Win32_MotherboardDevice")
Dim moss As ManagementObjectSearcher = New ManagementObjectSearcher(mss, ob)
Dim queryCollection As ManagementObjectCollection = moss.Get
Public Function Caption()
For Each getnow As ManagementObject In queryCollection
Caption = getnow("Caption")
Next
End Function
Public Function PrimaryBusType()
For Each getnow As ManagementObject In queryCollection
PrimaryBusType = getnow("PrimaryBusType")
Next
End Function
Public Function SecondaryBusType()
For Each getnow As ManagementObject In queryCollection
SecondaryBusType = getnow("SecondaryBusType")
Next
End Function
End Class
Please SUBSCRIBE to get new articles directly into your Email inbox!
تعليقات
إرسال تعليق