If you don’t know what Notepad++ is, why it would be useful, or why you should want it, read this other post first. If you are looking to replace Notepad on something other than Windows XP, check the wiki.
[A lot of people seem to be landing on this page, so I’ll add some screenshots soon to make the directions more clear (eventually).]
UPDATE: I’ve added a screencast for Windows7.
Now, f you’ve already been sold, what follows are the directions to make Notepad++ your default text editor on Windows XP (Read my Disclaimer first!):
Download the Notepad++ Windows installer (version 5.8.6 direct link or from the website) and then run through the installation. That’s all that is required if you want Notepad++, but if you want to make it your default editor there are a few more things to do:
Download this launcher (direct link via Notepad++ download page). It comes as a .zip with a text (.txt) file and an executable (.exe) file inside. Unzip the zip. The text file gives you the directions for making ++ your default, so have at it if you don’t want my extra details. For everyone else, fire up Explorer. This can be done by double-clicking any folder around or by going to the Start menu, clicking Run, and then typing “explorer” into the box and hitting Enter. Now copy this text
and paste it into the address bar at the top of the Explorer window. Hit Enter, and you’ll be inside the folder (also referred to as a “directory”). You may see all kinds of files/folders in blue text– make sure that you do not delete or rename any of these (that might very well screw up your computer). Just in case you change your mind in the future and want Notepad back, start typing “n o t …” until a file called notepad.exe is highlighted. Right click it and then click “Rename.” Change the name to notepad.exe.bak, or anything you can easily remember. This just makes it so that Windows can’t find it, but you can when if you make the bizarre decision to switch back to regular Notepad. By the way, doing this might make Windows upset so that it will warn you to quit fooling with its guts. Don’t listen (choose whichever option means “I’ll do what I want!”).
Now go back to your Desktop, or wherever you left the launcher executable, and copy it. Paste it into the c:\windows\system32\dllcache folder that you just opened. Notice that you have simply replaced the original Notepad.exe with something that has the same name, but contains different stuff. So now when Windows goes to look for Notepad.exe, it will find and launch the new file you stuck in there instead of the old one (which we renamed). How sneaky of us!
Unfortunately, you have to do this process two more times (Windows wants to make sure you absolutely believe that regular Notepad is a terrible piece of software). So, go to c:\windows\system32 in Explorer and rename the file Notepad.exe (again), then paste in the new version (again). Do this once more in c:\windows\. Finally! Windows will throw some more warnings at you, and ask if you want to revert to the original files, threaten to murder your first-born child, etc. Again, tell it that you’ll do what you want.
Now you have replaced Notepad with Notepad++. By default, every time you double-click a .txt file you’ll end up inside Notepad++. Easy, eh? There will also be an “Edit with Notepad++” option added to your right-click context menu. Enjoy your new and improved text editor! And if you’re down to learn regular expressions in NP++, I have a post for that.