traviblog

just some sort of lame blog

Replacing Notepad with Notepad 2 on XP SP3, the easiest way possible

After installing SP3 on XP I noticed that Notepad was reverted back to its crappy self, so I decided to write a handy batch script to install Notepad2 again. This script will work in XP SP2+. Place the batch file in the same directory as notepad2.exe and run it.

InstallNotepad2XP.bat

@echo off
echo *IMPORTANT*
echo This will kill all open instances of Notepad.
echo To cancel, end this batch file now (ctrl+c), or hit any key to continue.
pause
echo Killing all instances of notepad running...
TASKKILL /F /IM notepad.exe /T
echo Backing up...
call :backup %systemroot%\servicepackfiles\i386
call :backup %systemroot%
call :backup %systemroot%\System32
call :backup %systemroot%\System32\dllcache
echo Installing...
copy notepad2.exe %systemroot%\servicepackfiles\i386\notepad.exe /y
copy notepad2.exe %systemroot%\notepad.exe /y
copy notepad2.exe %systemroot%\System32\notepad.exe /y
copy notepad2.exe %systemroot%\System32\dllcache\notepad.exe /y
echo Done.
pause
goto :end
:backup
call set npath=%1
set count=0
for %%i in (%npath%\notepad.original*.exe) do (
set nname=%%i
set /a count=count+1
)
echo backing up to %npath%\notepad.original%count%.exe
copy %npath%\notepad.exe %npath%\notepad.original%count%.exe /y
:end
Comments

Archived Comments

namedatecomment
Mike Works great! Thanks!
Heidi Thanks for this! I replaced it with Villian's Notepad 2008. At first it didn't work, but then I realized it didn't work because it didn't have all the .dll files the program needed to run correctly. I copied the .dll files to the correct place, and now it works!

You're amazing! Now I'm off to figure out how to get rid of that stupid drwatson again. I got rid of him on Win XP SP2, but now I sadly have Win XP SP3, so I guess I have to boot him away again :(
Wayne This worked great. Notepad2 is a million times better than the standard issue, and this script worked perfectly. Thanks for the help.
Francis I have a system with WinXP SP3 preinstall to make it work I had to replace the c:\I386\notepad.ex_ by a rename version of notepad2.exe -> notepad.ex_ then run this script. Hope it helps.
Jai In the event one needs to revert back to the original - is there a way to do that?
Exi Thanks a lot

I've link you!
nick Fantastic, THANK YOU

1. I extracted the winzip files into C:\Windows directory
2. Made the bat file as instructed above & put it also in C:\Windows.
3. Run the .bat file & it worked.

BTW I use XPsp3

nick

comments powered by Disqus