注册码是按照你这自己的逻辑设计的,获取MAC地址之后进行一定逻辑字符运算,得出新的字符进行注册即可
Public Function GetMacAddress() As String
Dim objWMIService As Object
Dim colItems As Object
Dim objItem As Object
Dim strMacAddress As String
strMacAddress = ""
Set objWMIService = GetObject("winmgmts:\\.\root\CIMV2")
Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True")
For Each objItem In colItems
strMacAddress = objItem.MACAddress
Exit For
Next objItem
Set objWMIService = Nothing
Set colItems = Nothing
GetMacAddress = strMacAddress
End Function