Code: Select all
Imports System.Management
Public Class Form1
Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim *****uInfo As String = String.Empty
Dim mc As New ManagementClass("win32_processor")
Dim moc As ManagementObjectCollection = mc.GetInstances()
For Each mo As ManagementObject In moc
If *****uInfo = "" Then
*****uInfo = mo.Properties("processorID").Value.ToString()
Exit For
End If
Next
TextBox1.Text = *****uInfo
End Sub
End Class
USE HWID
Code: Select all
Imports System.Management
Public Class Form1
Public hwid As String = "yourhwid"
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim *****uInfo As String = String.Empty
Dim mc As New ManagementClass("win32_processor")
Dim moc As ManagementObjectCollection = mc.GetInstances()
For Each mo As ManagementObject In moc
If *****uInfo = "" Then
*****uInfo = mo.Properties("processorID").Value.ToString()
Exit For
End If
Next
If *****uInfo <> hwid Then
MsgBox("Bad HWID verification, application will close")
Application.Exit()
End If
End Sub
End Class