Click here to Skip to main content
15,668,167 members
Articles / Desktop Programming / MFC
Posted 26 May 2005


115 bookmarked

MAC Address Changer for Windows XP/2003

Rate me:
Please Sign up or sign in to vote.
4.68/5 (64 votes)
26 May 2005CDDL3 min read
A freeware program (with source code) that allows you to change the MAC ID of your network adapter
Image 1
Fig. 1 : Screenshot of the one and only main dialog
Image 2
Fig. 2 : You can use getmac from a command prompt to list MAC Addresses of your n/w adapters


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.


  • Windows XP / Windows 2003


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.

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

    Image 4

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.


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.


  • 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


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

Written By
United States United States
Nish Nishant is a Principal Software Architect based out of Columbus, Ohio. He has over 17 years of software industry experience in various roles including Lead Software Architect, Principal Software Engineer, and Product Manager. Nish was a Microsoft Visual C++ MVP between 2002 and 2015.

Nish is an industry acknowledged expert in the Microsoft technology stack. He authored C++/CLI in Action for Manning Publications in 2005, and had previously co-authored Extending MFC Applications with the .NET Framework for Addison Wesley in 2003. In addition, he has over 140 published technology articles on and another 250+ blog articles on his WordPress blog. Nish is vastly experienced in team management, mentoring teams, and directing all stages of software development.

Contact Nish : If you are interested in hiring Nish as a consultant, you can reach him via his google email id voidnish.

Company Website :

Comments and Discussions

GeneralMy vote of 5 Pin
Member 1241303525-Mar-16 1:41
Member 1241303525-Mar-16 1:41 
QuestionCommand line Pin
Member 1241303523-Mar-16 13:09
Member 1241303523-Mar-16 13:09 
AnswerRe: Command line Pin
Nish Nishant23-Mar-16 13:13
sitebuilderNish Nishant23-Mar-16 13:13 
GeneralRe: Command line Pin
Member 1241303525-Mar-16 1:45
Member 1241303525-Mar-16 1:45 
GeneralRe: Command line Pin
Nish Nishant25-Mar-16 3:48
sitebuilderNish Nishant25-Mar-16 3:48 
Questionmac change help for program in labview Pin
Juanjo837-Dec-12 2:04
Juanjo837-Dec-12 2:04 
GeneralMy vote of 5 Pin
IBelongToYou4-Oct-12 15:25
IBelongToYou4-Oct-12 15:25 
GeneralMy vote of 5 Pin
Chandrabhan Sangale12-Aug-11 18:40
professionalChandrabhan Sangale12-Aug-11 18:40 
Questioncan't change mac address Pin
simsim12330-Jun-11 17:36
simsim12330-Jun-11 17:36 
Questioncan't changemacaddress Pin
simsim12330-Jun-11 17:35
simsim12330-Jun-11 17:35 
GeneralThis really makes me mad Pin
852derek8524-Feb-11 20:54
852derek8524-Feb-11 20:54 
GeneralRe: This really makes me mad Pin
Nish Nishant18-Apr-11 6:08
sitebuilderNish Nishant18-Apr-11 6:08 
GeneralThank you Pin
Dave31328-Sep-10 20:07
Dave31328-Sep-10 20:07 
GeneralRe: Thank you Pin
Nish Nishant28-Sep-10 20:48
sitebuilderNish Nishant28-Sep-10 20:48 
Generalfeature request [modified] Pin
j4v127-Aug-10 20:29
j4v127-Aug-10 20:29 
GeneralResolved Issue. Pin
AshishKaira24-Jun-09 2:28
AshishKaira24-Jun-09 2:28 
Question"divisor" question? Pin
Hunt Chang13-Feb-09 5:26
Hunt Chang13-Feb-09 5:26 
AnswerRe: "divisor" question? Pin
Hunt Chang13-Feb-09 5:29
Hunt Chang13-Feb-09 5:29 
Generalwork on LAN but not Wifi card Pin
Member 38278988-Feb-09 21:22
Member 38278988-Feb-09 21:22 
GeneralWorks fine, even when other fails ;) Pin
yavor nenov7-Feb-09 0:25
yavor nenov7-Feb-09 0:25 
GeneralRe: Works fine, even when other fails ;) Pin
Nish Nishant7-Feb-09 2:05
sitebuilderNish Nishant7-Feb-09 2:05 
GeneralC# version of Mac Changer Pin
nexus9912-Jan-09 3:14
nexus9912-Jan-09 3:14 
GeneralRe: C# version of Mac Changer Pin
Nish Nishant12-Jan-09 5:02
sitebuilderNish Nishant12-Jan-09 5:02 
GeneralAbout release verion Pin
Elaaber16-Nov-08 14:10
Elaaber16-Nov-08 14:10 
GeneralRe: About release verion Pin
Nish Nishant12-Jan-09 5:03
sitebuilderNish Nishant12-Jan-09 5:03 

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

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