Results 1 to 20 of 20

Thread: resolved - How uniquie is the cpu id ?

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Dec 2005
    Location
    UK
    Posts
    127

    resolved - How uniquie is the cpu id ?

    how unique is this ? will i ever get duplicates ? and will it ever change ?

    ... i want some way of relating my software to the customer .... is there a system GUID?

    Code:
        Function GetCPUID() As String
            Dim sReturn As String = ""
            Try
                Dim objMOS As ManagementObjectSearcher
                Dim objMOC As Management.ManagementObjectCollection
                Dim objMO As Management.ManagementObject
    
                objMOS = New ManagementObjectSearcher("Select * From Win32_Processor")
                objMOC = objMOS.Get
                For Each objMO In objMOC
                    sReturn = objMO("ProcessorID")
                    Exit For
                Next
                objMOS = Nothing
                objMOC = Nothing
                objMO = Nothing
            Catch ex As Exception
                '# error getting cpu id
                myErr.WriteToErrorLog(ex.Message, Environment.StackTrace, "Error returning system ID.")
            End Try
            Return sReturn
        End Function
    Last edited by illskills; Mar 4th, 2010 at 10:33 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width