How to replace notepad.exe with notepad2.exe


Thanks to some great comments and a specific one from James I have now replaced notepade.exe with the vastly superior notepad2.exe and prevented Windows File Protection from replacing the new notepad.


Here are the steps (warning, process with care, no warranties etc):


Method 1


1) Rename Notepad2.exe to Notepad.exe
2) go to %windir%\system32
3) Rename Notepad.exe to NotepadX.exe
4) go to %windir%\system32\Restore
5) Turn off hide invisible files in Tools->Folder Options->View
6) Select filelist.xml and right click->Properties and uncheck Read-only
7) Edit the file
8) Add:


<REC>%windir%\notepad.exe</REC>


to:


<Exclude>
    <REC>%windir%\system.ini</REC>
    <REC>%windir%\tasks\desktop.ini</REC>
    <REC>%windir%\win.ini</REC>
    <REC>*:\AUTOEXEC.BAT</REC>
    <REC>*:\CONFIG.MSI</REC>
    <REC>*:\CONFIG.SYS</REC>
</Exclude>


9) copy the newly renamed notepad2.exe (now named notepad.exe) to %windir%\system32


note: it turns out that for some folks, this doesn’t work. It did not work for me on my tablet pc. Thanks to Shakeel Mahate here is method #2.


Method 2



  1. Tools->Folder Options->View uncheck Hide protected operating system files. 

  2. rename Notepad2.exe notepad.exe 

  3. copy notepad.exe %windir%/system32\dllcache 

  4. copy notepad.exe %windir%/system32 

  5. A dialog will popup hit cancel 

  6. Recheck Hide protected operating system files in the Folder Options dialog box

The dllcache contains copies of the windows protected files. The dllcache isnt itself protected.

Comments (91)

  1. Sean says:

    You can also do a brute force method. Check out the metapad FAQ at http://www.liquidninja.com/metapad/faq.html#Q28, which is also an awesome notepad replacement.

  2. Simon says:

    I’ve been using notepad2 since you mentioned it before… It would be great if Microsoft could assimilate it and its author, or at least incorporated something very similar in Longhorn.

    Would save having to replace notepad with one file or another everywhere I go.

  3. Anonymous says:

    SwitchBL8’s gebazel – Getting around WFP

  4. Sean Terry says:

    Hmm… even with read-only unchecked, I still get Access to blahblahfilelist.xml is denied.

    /running as an administrator.

  5. Sean Terry says:

    Nevermind.

    attrib -s -h filelist.xml

  6. Homam Alsayed says:

    I just downloaded and installed Notepad2. It’s very nice and minimal, but what ticks me off about it is you can run only one instance at a time. If you open another document by double-clicking, it replaces the existing document you’re currently working on. This is very limiting.

  7. Omar Shahine says:

    Homam, check the settings menu and uncheck reuse windows.

  8. Stephane Rodriguez says:

    Ultraedit, EditPlus, … are MDI editors. Sticking to a SDI app is a bit odd these days.

  9. Homam Alsayed says:

    Thanks Omar! For some reason I didn’t notice that option.

  10. Shawn says:

    Thanks for the time Omar! I’ve tried this before using my limited knowledge without success.

  11. Shakeel Mahate says:

    Your instructions do not apply to Windows Server 2003. If anybody is interested in replacing notepad.exe with Notepad2.exe for Windows Server 2003, here are the instructions:

    1. Tools->Folder Options->View uncheck Hide protected operating system files.

    2. ren Notepad2.exe notepad.exe

    3. copy notepad.exe %windir%/system32dllcache

    4. copy notepad.exe %windir%/system32

    5. A dialog will popup hit cancel

    6. Recheck Hide protected operating system files in the Folder Options dialog box

    The dllcache contains copies of the windows protected files.

    The dllcache isnt itself protected.

  12. Homam Alsayed says:

    Florian uploaded a new version (1.0.06) that has bookmarks:

    Ctrl-F2: Sets/Clear bookmark

    F2: Go to next bookmark

    Shift-F2: Got ot previous bookmark

    Ctrl-Shift-F2: Clear all bookmarks

    <a href="http://www.flos-freeware.ch/notepad2.html">Check it out!</a>

  13. Kapil says:

    This is pretty cool. Is there a way to open muliple files in the same editor though. That would be an excellent feature.

    Thanks,

    Kapil

  14. Omar Shahine says:

    Check the settings meny and turn off reuse windows.

  15. Sam Collett says:

    Here is a batch script that allows you to replace notepad with any notepad replacement: http://webdevel.blogspot.com/2004_04_01_webdevel_archive.html#108246184802912349

    The advantage is it will work with any file that you drag onto it, and you do not need to unhide system files. Because of that, a backup is made and can be restored by running the batch file again.

    However, it does not edit filelist.xml and so the Windows Protection box appears. I guess the only way to edit the filelist.xml as well is to write a VBS file – a check would need to be done for Windows versions though.

  16. Nikkie says:

    first method worked for me ..

  17. Nikkie says:

    instead of rplacing with nopepad2 i replaced with edit pad lite . did all the steps above but used the editpadlite program for ym replacement http://www.editpadlite.com/

    really kool notepad replacement and free..

  18. Nikkie says:

    instead of replacing with nopepad2 i replaced with edit pad lite . did all the steps above in method 1 but used the editpadlite program for my replacement http://www.editpadlite.com/

    really kool notepad replacement and free..

  19. Nikkie says:

    damn , they lied . it isnt free. for that i go to astalavista 😀

  20. Suren Rajasooriyar says:

    It does not support unicode languages, when I type in tamil it displays question marks only. but it’s a app.

  21. 仪表 says:

    Can It support chinese or japaness?

    When I save a .htm from http://www.18show.cn ,I use notepad2 open it, it lost,why?

  22. Chris says:

    Great replacement for the bog standard notepad we’ve all been using for years. Has it even changed any at all since at least Windows 3.1?

    Installation was simple though. Norton deleted notepad.exe for me because it got infected by a trojan from a damn website. All i done was put the exe and dll there and it worked.

    Fantastic!

  23. Josh says:

    A simpler method: Just stick notepad in a folder somewhere, right click on a text document and choose Open With, select notepad2.exe (You may have to search for it), tick the ‘Always use this program’ box and click OK. This saves all that messing around, and you don’t even need admin privleges to do it.

  24. flyrite says:

    Here’s an excellent program to replace system files for XP and 2K.

    <a href="http://www3.telus.net/_/replacer/&quot; TARGET=_blank>Replacer</a>

    Real easy to use. Drag and Drop. Just make sure you put the file you are going to replace your system file with on your root, otherwise it might drop with the shortcut path in quotes and that won’t work.

    have fun!

  25. flyrite says:

    oops, copied the html from a page i was creating. haha.

  26. Quick Links says:

    How
    to replace notepad.exe with notepad2.exe – Good entry on an MSDN blog
    on replacing the lame notepad program with the superior notepad2

  27. thebesghost says:

    [来源:Roy Osherove] 工具范围包括日常使用的,象PowerShell,Windows Desktop Search,Google Desktop ,开发用的 Reflector,TestDriven.NET,CodeSmith ,NUnit,Fiddler,XML工具XmlSpy,底层的FileMon,博客工具Windows Live Writer,John Lam的RubyCLR ,Web应用测试工具Watir,拷贝工具RoboCopy等等

    详见他的博客帖子,

    Scott

  28. NotePad2 is another Windows NotePad replacement. This text editor has syntaxt highlighting (C# too!).

  29. Just Mark says:

    I&#39;ve been doing a lot of work and research lately around Community Server and the wonderful new version

  30. I have been working on creating a fresh VM image and I thought it would be interesting to list out what

  31. See Omar Shahine’s post. Here is Omar’s first method that I use: 1) Rename Notepad2.exe to Notepad.exe2)…

  32. Redwerb says:

    I am always on the lookout for new tools to help me become more productive. This list contains the tools

  33. Redwerb says:

    I am always on the lookout for new tools to help me become more productive. This list contains the tools

  34. Project84 says:

    Replace windows notepad with notepad2

  35. Project84 says:

    Replace windows notepad with notepad2