Replacing notepad with notepad2 On Windows XP Service Pack 2

time to read 3 min | 403 words

I really like Notepad2, but the post about Replacing notepad with notepad2 wouldn't work on XP SP2, here is one that works, apperantly the only change is from %systemroot%\system32\dllcache to %systemroot%\ServicePackFiles\i386

@echo Replacing NOTEPAD.EXE with notepad2.EXE ...
REM
REM 1. Prevent the protected file system from doing its thing.
attrib -r -h -s %systemroot%\system32\dllcache
del %systemroot%\system32\dllcache\notepad.bak.exe
ren %systemroot%\system32\dllcache\notepad.exe notepad.bak.exe
attrib +r +h +s %systemroot%\system32\dllcache
attrib -r -h -s %systemroot%\ServicePackFiles\i386
del %systemroot%\ServicePackFiles\i386\notepad.bak.exe
ren %systemroot%\ServicePackFiles\i386\notepad.exe notepad.bak.exe
attrib +r +h +s %systemroot%\ServicePackFiles\i386

REM
REM 2. Make backup copies of Notepad in the Windows and System32 folders.
del %systemroot%\system32\notepad.bak.exe
copy %systemroot%\system32\notepad.exe %systemroot%\system32\notepad.bak.exe
copy %systemroot%\notepad.exe %systemroot%\notepad.bak.exe
REM
REM 3. Copy notepad2 to Notepad in  the Windows and System32 folders.
del %systemroot%\notepad.exe
copy notepad2.exe %systemroot%\notepad.exe
copy notepad2.exe %systemroot%\system32\notepad.exe
REM
@echo Succeeded.
@echo
@echo NOTE: When the Windows file protection message pops up,
@echo click Cancel, then click Yes to confirm your intentions.