change and read MAC adress

Started by pamsniffer, October 21, 2015, 12:44:19 PM

Previous topic - Next topic

pamsniffer

Hi,

I can read an mac adress but is there also a way to change it.

for reading
strComputer = "."
objWMIService = GetObject(StrCat("winmgmts:!\\" , strComputer , "\root\cimv2"))
colAdapters = objWMIService.ExecQuery("Select * from Win32_NetworkAdapterConfiguration Where IPEnabled = True AND DHCPEnabled = True")
ForEach objAdapter in colAdapters
   Message( "Physical address: " , objAdapter.MACAddress )

How can I change an MAC adress.

PAM

td

Obviously, you can't change a NIC's MAC address as  it is permanently assigned by the manufacturer.  It can be spoofed, however.  One programmatic way to doing this (other than UI automation)  is to change the registry and then renew the IP configuration.   A Web search should turn up some examples.  Here is but one link:

http://www.wikihow.com/Change-a-Computer's-Mac-Address-in-Windows
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade