Replace the Windows Notepad with a Better Notepad

Table of Contents

  1. Introduction
  2. Replacing Notepad with Notepad2
  3. Problems with replacing notepad
  4. Other Notepad replacements
  5. More Information

Introduction

Damn you Microsoft! I am a notepad addict. If you look at my taskbar at any time and you will see at least 5 notepads, usually a lot more running at one time. Why? Because it is fast and small I use it to keep notes, to do lists, phone numbers, write code, search and replace, etc. The reasons are endless....

What are some of the things I do not like about Windows Notepad:

So what are our options? Replace it with a freeware notepad replacement. For this tutorial we will focus on Notepad2. Notepad2 is a freeware replacement to notepad with the following features:




Notepad2 notepad replacement



Providing a seamless replacement of notepad can be difficult, though, due to Windows XP's and Windows 2000/2003's Windows System File Protection (SFP) security feature. What this means is that when you replace a Windows system file with another file, SFP will automatically replace it with the original. I have though, provided some information below that should make it easier to do this replacement.


Replacing Notepad with Notepad2


The goal here is to make working with Notepad2 seem like you are working with the original Notepad by actually replacing notepad.exe with the notepad2 executable. To do this we will rename notepad2.exe to notepad.exe and copy it to the proper locations so as to overcome SFP as described above. Before we do anything, please enable the viewing of hidden system files by following the instructions in the tutorial below:

How to see hidden files in Windows

Now we need to download Notepad2 from the following link:

http://www.flos-freeware.ch/notepad2.html

Save it to your hard drive and extract the files to C:\Notepad. Once extracted, rename notepad2.exe to notepad.exe. Now you should have a folder called C:\Notepad that contains the file notepad.exe.

When you have have followed the steps above you need to do the next series of steps. These steps should be done fairly quickly in order to beat SFP at its game. If you go too slow, then SFP may replace notepad.exe with the original Windows notepad. For those who do not want to deal with the instructions below, I have created two batch files that will do all these steps for you and almost always gets past the SFP problem. These batch files can be downloaded from the following link depending on your operating systems:

Notepad Replacement for XP

Notepad Replacement for 2000

As long as you have notepad2.exe saved as C:\Notepad\notepad.exe, then the batch files above should be able to perform the replacement for you. After running the batch file you may get an alert from Windows saying one of your files (notepad.exe) was replaced with another file and asking if you want to restore it. You should press the Cancel button and the Yes button so that it does not replace the file. When done, feel free to delete your C:\notepad folder and hide your files again.

If instead you would like to do this manually, then below are the manual steps that the batch files does for you. These steps should be done in this exact order and as fast as possible to bypass SFP:

  1. Make backup copies of notepad.exe in the following directories (Not necessary but good in case you want to roll back to the original notepad):
    • C:\Windows\System32\notepad.exe
       
    • C:\Windows\notepad.exe
       
    • C:\Windows\system32\dllcache\notepad.exe
       
    • C:\WINDOWS\ServicePackFiles\i386\notepad.exe
       
    • C:\Windows\System32\dllcache\notepad.exe
       
  2. Copy C:\Notepad\notepad.exe to all the directories listed above overwriting the notepad.exe that is there.
     
  3. If Windows will issue an alert stating that the new notepad.exe is not the correct one and if you would like to correct. Press cancel at this prompt and then press Yes as we want to keep the new notepad replacement.
     
  4. Delete the C:\notepad folder.
     
  5. Hide your files again.

If these steps did not work, then you should examine the problems section below.

Problems replacing notepad


The above approach may not always work if you have the installation files for Windows XP/2000 available to System File Protection as SFP may use those files to replace notepad as well. If you are running into problems because of this you can check the following registry paths to determine where the OS Source and Service Pack sources files are located. Once you determine that, you can rename those folder temporarily and then do the above procedure again. The registry locations for getting this information are:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\\Installation Sources
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\\ServicePackSourcePath
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\\SourcePath


Other Notepad replacements

If Notepad2 does not turn out to be a notepad replacement that works for you, you can check out the following other free notepad replacements:

A great article with comparisons on the different text editors available can also be found here:

http://en.wikipedia.org/wiki/Comparison_of_text_editors