Click here to Skip to main content
Licence CDDL
First Posted 26 May 2005
Views 411,855
Downloads 16,998
Bookmarked 111 times

MAC Address Changer for Windows XP/2003

By | 26 May 2005 | Article
A freeware program (with source code) that allows you to change the MAC ID of your network adapter
Fig. 1 : Screenshot of the one and only main dialog
Fig. 2 : You can use getmac from a command prompt to list MAC Addresses of your n/w adapters

Overview

My cable ISP does something really unusual and annoying: it locks a cable modem to the N/W card's MAC address, thereby disallowing a user from either changing his network card or using a different machine. When my dad visits me, this is most inconvenient as he cannot plug his laptop into the internet and I don't have a LAN at home he can plug into. A Linuxian friend of mine suggested that I change the MAC ID, which is apparently a one-command operation on Linux-based machines.

I Googled around and found that changing the MAC under Windows involved changing certain registry values and resetting the network adapter. I barely trust my dad with his laptop, so you can imagine how I felt about trusting him to modify the registry and reset network adapters. I am not particularly crazy about coding; I do it for a living as well as an off-work hobby, but I thought it'd be a prudent idea to write a GUI application for my dad in my spare time. That's how MAC Address Changer for Windows XP/2003 came into being.

Requirements

  • Windows XP / Windows 2003

Operations

Change the MAC ID

Enter a MAC Address into the edit box and click the Change button. It validates the ID you've entered, so you cannot enter a MAC like "I am a chicken hawk" or something goofy like that.

Reset the MAC ID

This'll reset the MAC address to the adapter default.

Things to Note

  • Normally, both operations would be pretty straightforward. Sometimes though, with some network adapters, programmatic reset of the adapters will fail. In that case, you'll get a message box telling you that you'll need to manually reset the adapter.

  • If you don't have write-access to the HKLM registry key hierarchy, both operations fail.

Program Usage

The program can be used freely for commercial and non-commercial purposes.

Source Code

The source code (decently commented, I hope) has been included. I used VC++ 2005 Beta 2 (MFC dialog application without the /clr option), so you'll need that to open the project files. All the textual UI is taken from the resource, so it should be pretty easy to have versions for other languages, say German or French for instance. If anyone modifies the source code, I request that my original copyright comment headers be left intact.

Pseudo-Statutory Warning

This program may not work with some network adapters and it might cause an adapter to stop working normally if MAC IDs are incessantly changed/reset. Some network administrators might have forbidden the practice of changing MAC addresses, so you might want to check with your sys-admin before you use this program.

Conclusion

This application was written out of personal necessity and if it is useful to other people, well and good. If not, oh well, then nothing is lost anyway. The source code has been provided for interested people.

History

  • May 19, 2005: Began work on program
  • May 25, 2005: Made fixes to allow program to run on Windows 2003
  • May 27, 2005: Program (with source code) first published on The Code Project

License

This article, along with any associated source code and files, is licensed under The Common Development and Distribution License (CDDL)

About the Author

Nish Sivakumar



United States United States

Member

Nish is a real nice guy who has been writing code since 1990 when he first got his hands on an 8088 with 640 KB RAM. Originally from sunny Trivandrum in India, he has been living in various places over the past few years and often thinks it’s time he settled down somewhere.
 
Nish has been a Microsoft Visual C++ MVP since October, 2002 - awfully nice of Microsoft, he thinks. He maintains an MVP tips and tricks web site - www.voidnish.com where you can find a consolidated list of his articles, writings and ideas on VC++, MFC, .NET and C++/CLI. Oh, and you might want to check out his blog on C++/CLI, MFC, .NET and a lot of other stuff - blog.voidnish.com.
 
Nish loves reading Science Fiction, P G Wodehouse and Agatha Christie, and also fancies himself to be a decent writer of sorts. He has authored a romantic comedy Summer Love and Some more Cricket as well as a programming book – Extending MFC applications with the .NET Framework.
 
Nish's latest book C++/CLI in Action published by Manning Publications is now available for purchase. You can read more about the book on his blog.
 
Despite his wife's attempts to get him into cooking, his best effort so far has been a badly done omelette. Some day, he hopes to be a good cook, and to cook a tasty dinner for his wife.

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralMy vote of 5 PinmemberChandrabhan Sangale18:40 12 Aug '11  
Questioncan't change mac address Pinmembersimsim12317:36 30 Jun '11  
Questioncan't changemacaddress Pinmembersimsim12317:35 30 Jun '11  
GeneralThis really makes me mad Pinmember852derek852@gmail.com20:54 4 Feb '11  
GeneralRe: This really makes me mad PinmvpNishant Sivakumar6:08 18 Apr '11  
GeneralThank you PinmemberDave31320:07 28 Sep '10  
GeneralRe: Thank you PinmvpNishant Sivakumar20:48 28 Sep '10  
Generalfeature request [modified] PinmemberMember 733103420:29 27 Aug '10  
GeneralResolved Issue. PinmemberAshishKaira2:28 24 Jun '09  
Question"divisor" question? PinmemberHunt Chang5:26 13 Feb '09  
AnswerRe: "divisor" question? PinmemberHunt Chang5:29 13 Feb '09  
Generalwork on LAN but not Wifi card PinmemberMember 382789821:22 8 Feb '09  
GeneralWorks fine, even when other fails ;) Pinmemberyavor nenov0:25 7 Feb '09  
GeneralRe: Works fine, even when other fails ;) PinsitebuilderNishant Sivakumar2:05 7 Feb '09  
GeneralC# version of Mac Changer Pinmembernexus993:14 12 Jan '09  
GeneralRe: C# version of Mac Changer PinsitebuilderNishant Sivakumar5:02 12 Jan '09  
GeneralAbout release verion PinmemberElaaber14:10 16 Nov '08  
GeneralRe: About release verion PinsitebuilderNishant Sivakumar5:03 12 Jan '09  
QuestionYour Windows computer sits on the wire? Pinmemberdontknowitall4:33 9 Mar '08  
Putting your Windows-based computer on the wire with absolutely zero hardware protection between you and the Internet is one of the dumber things to do with a computer. Consider your computer compromised (e.g. rootkit'ed and botnet'ed) and reinstall Windows but not before you do yourself a favor and get a decent hardware router to stick between your computer and the Internet. A router will solve the need for this application/article because it acts as a Network Address Translation (NAT) device AND it doubles as a _hardware_ firewall solution AND you can configure the WAN MAC address to be whatever you want. You may be lucky and have an embedded router (some ISP hardware does that) but nothing beats a dedicated, fully configurable hardware router. About $35 to $50 gets you a decent, consumer-level hardware router. Windows software firewalls are a joke and don't work.
 
After reinstalling, you should rebuild the binaries and upload them. They may be compromised as well.
 
Other than that, good article.
GeneralThank You Pinmemberfedotawa5:12 9 Sep '07  
GeneralThanks!! Pinmemberquocky71117:48 14 Aug '07  
GeneralMac address from client machine PinmemberMaheshSankar2:59 25 Jun '07  
GeneralIdentify the computer type and mac address Pinmembernilketnil9:56 26 Mar '07  
QuestionLost MAC Address Pinmemberricdanmar11:12 18 Mar '07  
Generalmac doesn't change Pinmembermtbusta0:46 28 Feb '07  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web03 | 2.5.120529.1 | Last Updated 27 May 2005
Article Copyright 2005 by Nish Sivakumar
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid