How To: Replace Windows Notepad with a third party editor

FIRSTLY: Go Find a Thinstalled version of the text editor you want to use. This is because Thinstalled apps are wrapped up as a single executable and all the data output goes to a folder named Thinstall which, if you don't create the folder yourself anywhere, will create itself in your AppData directory. So let […]

FIRSTLY: Go Find a Thinstalled version of the text editor you want to use. This is because Thinstalled apps are wrapped up as a single executable and all the data output goes to a folder named Thinstall which, if you don't create the folder yourself anywhere, will create itself in your AppData directory. So let it create itself.

The two editors I can highly recommend for replacing Windows notepad are:

Notepad++ and EditPlus.

A LITTLE WARNING: to anybody contemplating running a third party Thinstalled Text Editor as notepad.exe . Don't run the same editor from other locations in your PC, if you are using it as notepad.exe. It tends to screw registry settings sooner or later.

HERE IS WHAT I DO: to replace notepad cleanly on my PC (XPSP2):

Make folder --> C:\notepad

Into this Folder throw EditPlus Thinstalled exe renamed to notepad.exe (for example).

Also Into this folder add a batch file (.BAT) with these lines:

@echo off
copy /y %WinDir%\System32\dllcache\notepad.exe %WinDir%\System32\dllcache\notepad.exe.orig
copy /y %WinDir%\ServicePackFiles\i386\notepad.exe %WinDir%\ServicePackFiles\i386\notepad.exe.orig
copy /y %WinDir%\System32\notepad.exe %WinDir%\System32\notepad.exe.orig
copy /y %WinDir%\notepad.exe %WinDir%\notepad.exe.orig
copy /y C:\notepad\notepad.exe %WinDir%\System32\dllcache
copy /y C:\notepad\notepad.exe %WinDir%\ServicePackFiles\i386
copy /y C:\notepad\notepad.exe %WinDir%\System32
copy /y C:\notepad\notepad.exe %WinDir%
echo.
echo.
echo Write down the locations after the REG_MULTI_SZ or REG_SZ in case the batch file does not work.  If it does not work, you will need to look in the locations from below to find other copies of notepad.exe that are possibly being used to restore the original notepad.exe
echo.
reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup /v "Installation Sources"
reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup /v ServicePackSourcePath
reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup /v SourcePath

RUN — the batch file and, YOU NOW HAVE — EditPlus defaulting as notepad.

THEN...TO CLEAN UP — any previous conflicts and freshen up the registry settings
for your default class name of "TextFile" do this:

MAKE — a ".REG" file using this code and merge it into your registry:

Windows Registry Editor Version 5.00

[-HKEY_CLASSES_ROOT\txtfile]


[HKEY_CLASSES_ROOT\txtfile]
@="Text Document"
"FriendlyTypeName"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,\
  00,6f,00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,\
  32,00,5c,00,6e,00,6f,00,74,00,65,00,70,00,61,00,64,00,2e,00,65,00,78,00,65,\
  00,2c,00,2d,00,34,00,36,00,39,00,00,00
"EditFlags"=dword:00010000

[HKEY_CLASSES_ROOT\txtfile\DefaultIcon]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
  00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,00,68,00,\
  65,00,6c,00,6c,00,33,00,32,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,31,00,35,\
  00,32,00,00,00

[HKEY_CLASSES_ROOT\txtfile\shell]

[HKEY_CLASSES_ROOT\txtfile\shell\open]
@="(value not set)"

[HKEY_CLASSES_ROOT\txtfile\shell\open\command]
@="C:\\WINDOWS\\system32\\NOTEPAD.EXE "%1""

[HKEY_CLASSES_ROOT\txtfile\shell\print]

[HKEY_CLASSES_ROOT\txtfile\shell\print\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
  00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,4e,00,4f,00,\
  54,00,45,00,50,00,41,00,44,00,2e,00,45,00,58,00,45,00,20,00,2f,00,70,00,20,\
  00,25,00,31,00,00,00

[HKEY_CLASSES_ROOT\txtfile\shell\printto]

[HKEY_CLASSES_ROOT\txtfile\shell\printto\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
  00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,6e,00,6f,00,\
  74,00,65,00,70,00,61,00,64,00,2e,00,65,00,78,00,65,00,20,00,2f,00,70,00,74,\
  00,20,00,22,00,25,00,31,00,22,00,20,00,22,00,25,00,32,00,22,00,20,00,22,00,\
  25,00,33,00,22,00,20,00,22,00,25,00,34,00,22,00,00,00

You Now Have a clean third party replacement of Windows notepad. REMEMBER — Don't run the same text editor as an app in its own right. Use it only as notepad.

Microsoft, Windows, Notepad, Notepad++, EditPlus, Tips and Tricks