Skip to main content

How to replace notepad.exe with notepad2.exe

Update: The Setup installer of the latest Notepad2 will automatically replace the Windows Notepad. Also, the method of replacement is very different for Windows 7, compared to what is described below. Instead of actually replacing the Windows Notepad, a registry hack simply redirects all Notepad requests to Notepad2. The Setup installer uses this registry hack. I am unable to determine if the setup does a replacement in Windows XP as well.

Original Post:
I searched the Internet on information on how to do that, and I found this nice page: Click here to see it.

But both the methods didn't work in my Windows installation, as the file protection dialog box was NEVER appearing. Windows was automatically replacing Notepad2 with the original Notepad without any warning or question. Then I worked around another method. Call it Method 3 if you will.

NOTE: These instructions apply to Windows XP Service Pack 2 only! My Windows installation is the Tablet PC Edition.

Download Notepad2 and extract it into a temporary folder.
Close all open windows of Notepad.
Go to My Computer and open C: Drive.
Go to Tools > Folder Options in the menu bar.
Go to View tab.
Under "Hidden files and folders", select "Show hidden files and folders".
Uncheck "Hide extensions for known file types" and "Hide protected operating system files".
Click OK.
Now you should see a new folder in C drive, called i386. Open it.
Go back to the temporary folder you have Notepad2 in.
Make a copy of Notepad2.exe and rename it to NOTEPAD.EX_
Copy this to C:\i386
Now go to C:\WINDOWS\system32
Rename notepad.exe to notepad.ex$
Make another copy of Notepad2.exe in the temporary folder, and rename it to notepad.exe
Now copy this to C:\WINDOWS\system32
Wait a few seconds to see if it is automatically replaced.
Now it shouldn't be so. If it does get replaced, then try this below. Otherwise go to FINAL STEPS.

Open Notepad and paste the following in it:

copy /Y "notepad.exe" "C:\WINDOWS\"
copy /Y "notepad.exe" "C:\WINDOWS\system32\dllcache\"
copy /Y "notepad.exe" "C:\WINDOWS\system32\"

Save it as "np.bat" in the temporary folder having Notepad2 (Make sure the "Save as type" is selected as "All files".
IMPORTANT: Close Notepad, and all open windows of Notepad.
Now go to the temporary folder and double click np.bat
This should work.
Now do the final steps below.

Go to Tools > Folder Options > View.
Reverse all the changes you had done previously.
Click OK.
Run Notepad by clicking Start > All Programs > Accessories > Notepad.
Is it still the original Notepad, or is it the better-than-the-best Notepad2?


Popular posts from this blog

Disable auto save in JetBrains IDE software (IntelliJ IDEA, PyCharm, PhpStorm)

JetBrains provides the following IDE software:
IntelliJ IDEAPhpStormPyCharmRubyMineWebStormAppCodeCLion Google also provides Android Studio which is powered by the IntelliJ platform.

If you come from a different IDE such as Eclipse, you will be unpleasantly surprised to find that JetBrains-branded IDEs automatically save everything the moment you look away. The proponents argue that as you work on your project, you should not have to worry about saving files. But to others, this auto-save behavior which is enabled by default is a curse that catches them by surprise, and a shocking departure from the workflow they are very much used to.

You can change the behavior by altering some settings.

Stop having to click Unblock on every downloaded file

CAUTION: The blocking of downloaded files in Windows is a security and safety feature to help prevent your computer from being infected by viruses and other malware. Only disable this feature if you know what you're doing.

I had been plagued by this annoyance since the days of Windows Vista. Any downloaded file, no matter what browser I use, gets tagged as "blocked" by Windows. You can open downloaded documents even though they are blocked, but when you run a downloaded application (such as a setup file) you're presented with a "Security Warning" before you're allowed to run it. It's worse if you extract a downloaded ZIP file with the Windows' built-in ZIP management. Every extracted file is blocked by default.

Being a geek who finds unnecessary "security" prompts annoying, the first thing I do in Windows is to disable the User Account Control (UAC). But I couldn't quite figure out how to disable blocking of downloaded files until …

Group, Ungroup and Regroup disabled in Word

I was editing a Microsoft Word document which had a collection of shapes and text boxes grouped together. I wanted to modify some of the shapes, and therefore I had to ungroup them. But when I right-click the group and open the Group menu, all three options namely Group, Ungroup and Regroup are completely disabled or grayed out.I couldn’t figure out what’s wrong. This group of objects is perfectly ungroupable, and I can even select objects within the group. However, Microsoft Word 2007 is not letting me ungroup it.I searched the Internet for a solution, but did not find anything very useful. The closest I came across is this statement: “The type of Text Wrapping doesn't make any difference as long as it isn't In Line with Text.” (Link here)Anyway, I changed the text wrapping of the group of objects from ‘In line with Text’ to ‘Tight’ and viola! I could now ungroup it and edit it. The document got a bit messed up when I did so, but after I ungrouped, edited and regrouped, I cha…