how to get mac address?

hi.
because hardwarelockid is changed with diffrent version of max.
so i want to get physical address(mac) to protect my script.
how to get it with maxscript?
thanks

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Marco Brunetta's picture

Hum I don't follow. The

Hum I don't follow. The snippet I pasted outputs the different NICs and their addresses.

flyingc's picture

it is so kind of you. thanks

it is so kind of you.
thanks

Marco Brunetta's picture

allNICs = (dotNetClass

allNICs = (dotNetClass "System.Net.NetworkInformation.NetworkInterface").GetAllNetworkInterfaces()
FOR nic in allNICs DO 
(
	print ("NIC: "+nic.description+" - Address: "+ ((nic.getPhysicalAddress()).toString()))
)
flyingc's picture

but allnics have two or more

but allnics have two or more elements,
how to get the mac that i want?
thanks

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.