ScriptSpot

Forum topic · General Scripting

how to get mac address?

By flyingc · 2009-08-25

Description

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 (4)

Marco Brunetta · 2009-09-02

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

flyingc · 2009-09-02

it is so kind of you.
thanks

allNICs = (dotNetClass

Marco Brunetta · 2009-08-25


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

flyingc · 2009-09-02

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