Imports System.Net.NetworkInformation
Public Class Form1
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
Dim myComName As String = Environment.MachineName
Dim myMac As String = getMacAddress()
Label1.Text = myMac & "_" & myComName
End Sub
Function getMacAddress()
Dim nics() As NetworkInterface = _
NetworkInterface.GetAllNetworkInterfaces
Return nics(0).GetPhysicalAddress.ToString
End Function
End Class