Tuesday, April 28, 2009

Function For Get MotherBoard Vaue


Dim key As Microsoft.Win32.RegistryKey
key = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\EWS")
Dim name As String = CType(key.GetValue("Path"), String)


Public Shared Function GetMotherBoardID() As String

Dim strMotherBoardID As String

Dim query As New SelectQuery("Win32_BaseBoard")

Dim search As New ManagementObjectSearcher(query)

Dim info As ManagementObject

For Each info In search.Get()

strMotherBoardID = info("SerialNumber").ToString()

Next

Return strMotherBoardID

End Function

No comments:

Post a Comment