Make Notepad++ your default editor (XP)

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

c:\windows\system32\dllcache

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.

20 thoughts on “Make Notepad++ your default editor (XP)

  1. Well, all right, but when I place notepad.exe in c:/windows/, it gets restored to the original notepad, automatically.

    1. You are right, and,

      Hello Admin (and all others),

      The correct order is REVERSE of this. ie:

      /Windows
      /Windows/System32
      /Windows/System32/dllCache

      Thanks!
      Keshava G N

      1. It’s been a long time since I’ve done this, so I can’t say which order is correct. I just hope that I was smart enough 4 years ago to write it out in the same order that I accomplished it in! Thanks for the info.

  2. It shouldn’t, if you did the steps in the order shown. Does it show you a dialog box first? It’s been a while since I’ve done it, but I seem to recall Windows telling me to stop screwing with stuff and that if I hit the wrong option in the dialog it would restore the original. You can try the process again, if you’ve already renamed the original executables, by just copying the little executable and Ctrl+V-ing it into those folders in the correct order, one after another. If it still doesn’t work I’m not sure what to tell you…

    Hope that helps.

  3. I get it installed ok, everything works great. The only problem I have is when I double-click a text file in an archive, such as a zip file, it opens a blank file in Notepad++, rather than the text. Even right clicking the zipped txt file and clicking edit opens a blank file. Aside from extracting the file and opening it with Notepad++, any ideas?

  4. I don’t think you can open a zipped file into Notepad++ at all. Is it possible with regular Notepad or with other editors? I’ve never actually tried to do this, so I’m not sure what to tell you.

  5. Then you could do the same thing if you have it installed on the computer’s hard drive. If you are actually running in portably (on a thumb drive or something) then you won’t be able to make it the default, I don’t think. The operating system is what decides what is default for an extension, and so you would have to modify the host operating system to make it launch your portable installation when you open a text or other file.

  6. I have done everything (replaced the notepad.exe, three times, with the one from the zip — and also made the registry edit). Everytime I double click on a txt file, nothing happens. I try to run the ‘new’ notepad.exe file, nothing happens.

    Any suggestions?

  7. Another way I found to change it (at least for .txt files) is to just right-click the text file you want to open, click “open with”, and then browse for Notepad++. Check the box that says “always use this program to open this type of file” and bam! Text files will always open with notepad++. Granted, it won’t be your default editor for other types of files, but at least text files will work fine with it.

  8. The missing thing is this…^
    You have to replace the notepad.exe in C:\WINDOWS\ServicePackFiles\i386 before you replace the other ones.

    This worked for me.

  9. Thanks Mads Gren,

    I haven’t had to do that but, as we all know, Windows is a silly beast that sometimes requires different taming methods.

  10. I use Notepad++ 5.4.4. After I replaced Notepad with Notepad++ as the default Notepad using the steps posted above (not a comment), Notepad again became the default Notepad. Is this occurrence a bug that must be fixed in Notepad++ 5.4.5 or I’m not following the instruction by Mads Gren. Anyway, I opened a text document inside a ZIP archive with my Notepad++.

  11. This hack will not work with programs which wait for notepad.exe exit.
    Big sample: svn client^
    – you type “svn ci”
    – svn client launch notepad++ launcher and pass temp file to it
    – launcher starts notepad++, pass temp file to it then terminated
    – svn client see that his editor (notepad++ launcher) terminated and asks:
    Log message unchanged or not specified
    (a)bort, (c)ontinue, (e)dit:

    So for svn better way specify SVN_EDITOR environment variable directly to notepad++.

  12. Adam, this website is so ballin. I stumbled upon it just googling around trying to solve problems, then I realized I knew the guy who’d written the tutorial.

    Nice one.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s