Como obtener el ID del CPU en vb.net

By | 2010/04/25

Estoy protegiendo un software para lo cual necesito obtener el id único del cpu de la máquina que lo utilizará, para esto desarrollé esta pequeña función:

Solución:

Imports System.Management

Private Sub obtener_id()
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

lbl_id.Text = objMO(“ProcessorID”)

Next

objMOS.Dispose()

objMOS = Nothing

objMO.Dispose()

objMO = Nothing
End Sub

Leave a Reply

Your email address will not be published. Required fields are marked *

This blog is kept spam free by WP-SpamFree.