Code: Select all
def changemac():
networkcard = OpenKey(
HKEY_LOCAL_MACHINE,
r"SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}\0001",
0, KEY_WRITE)
mykey = "NetworkAddress"
theend = raw_input("Please Enter The Mac Address to change to")
try:
value = SetValueEx(networkcard, mykey, 0, REG_SZ, theend)
print "Mac Successfully Changed to \n\n" + theend)
print "\n\n You now need to run \n http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q311272 \n\n")
print "Or reboot your computer Easiest Choice\n\n")
except:
print "Failed Setting Mac")
CloseKey(networkcard)