Travis's lame ol' blog

yay, Travis finally changed his blog!

- Wednesday, July 16, 2008

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

Archives Feed your aggregator (RSS 2.0)

<April 2014>
SunMonTueWedThuFriSat
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

Search

On this page....

Categories

Blogs

Sign In

newtelligence dasBlog 2.2.8279.16125