There are a lot of
articles on CP[
^] that could point you in the right direction.
This article [
^] helped me when I was looking for a unique value. It discusses pulling info about a computer with WMI. I use it to pull a ComputerSystemProduct UUID which so far appears to be unique for each computer (no guarantees). These are the methods I used to pull it:
Private Function GetComputerSystemProductUUID() As String
Return GetManagementObject("UUID", "Win32_ComputerSystemProduct")
End Function
Private Function GetManagementObject(ByVal strProperty As String, ByVal strCollection As String) As String
Dim sb As New System.Text.StringBuilder
Try
Dim objSearcher As New ManagementObjectSearcher("SELECT " & strProperty & " FROM " & strCollection)
Dim objCollection As ManagementObjectCollection = objSearcher.Get
For Each objM As ManagementObject In objCollection
For Each objP As PropertyData In objM.Properties
If objP.Value IsNot DBNull.Value Then
sb.Append(objP.Value)
End If
Next
Next
objSearcher.Dispose()
objCollection.Dispose()
Catch ex As Exception
MsgBox(ex.Message)
End Try
Return sb.ToString
End Function
Hope this helps.