Fervent Coder

Coding Towards Utopia...by Rob Reynolds
posts - 278 , comments - 431 , trackbacks - 0

My Links

News


Rob Reynolds

Subscribe to Fervent Coder RSS
Subscribe to Fervent Coder by Email

About Me

I manage several open source projects. Need...
   ...package management for Windows?
   ...automated builds?
   ...database change management (migrations)?
   ...your application to check email?
   ...a monitoring utility?

I also write for



Like what you are reading? Want to buy me a cup of coffee?
PayPal - The safer, easier way to pay online!

Archives

Post Categories

Image Galleries

Replacing Notepad With Notepad2 on Windows XP SP3

One of my favorite utilities is Notepad2.  I had a script to replace the original Notepad with Notepad2 on Windows, but as of Windows XP Service Pack 3, that no longer works.

Luckily, I found this script from Travis:

@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

Thanks Travis!

Print | posted on Saturday, September 13, 2008 12:05 PM | Filed Under [ Personal ApplicationsToysOther ]

Feedback

Gravatar

# re: Replacing Notepad With Notepad2 on Windows XP SP3

Very helpful. Thanks.
9/13/2008 3:55 PM | Russell Ball
Gravatar

# re: Replacing Notepad With Notepad2 on Windows XP SP3

Very helpful.

Thank you.
9/15/2008 3:09 PM | Kostas
Gravatar

# re: Replacing Notepad With Notepad2 on Windows XP SP3

Very helpful batch file! Quick note that this batch file should be run from the *same* directory as Notepad2.exe

:)
11/2/2008 1:09 AM | Ben
Gravatar

# re: Replacing Notepad With Notepad2 on Windows XP SP3

@Ben: Ah, yes. :D
11/2/2008 1:42 AM | Robz
Gravatar

# re: Replacing Notepad With Notepad2 on Windows XP SP3

DONE. GREAT!

Thank you very much guys ;)

P.S. As i see MS is against IMPROVEMENTS!.. instead of THAT they should learn a lot o f things... :}
1/30/2009 10:07 AM | BlackJoker
Gravatar

# re: Replacing Notepad With Notepad2 on Windows XP SP3

Thank you very much!
2/24/2009 8:09 PM | sliuqin
Gravatar

# re: Replacing Notepad With Notepad2 on Windows XP SP3

I was able to do this simply by opening the 4 directories you indicated in 4 separate windows and just pasting the new Notepad.exe over top of each as quickly as possible.
4/30/2009 12:11 AM | Louis
Gravatar

# re: Replacing Notepad With Notepad2 on Windows XP SP3

@Louis: That's like saying I inserted the data into the database by hand instead of using your application.

Cheers!
4/30/2009 9:04 PM | Robz
Gravatar

# re: Replacing Notepad With Notepad2 on Windows XP SP3

Thanks a lot for sharing this!!
very useful - seems the old methods for SP2 were no longer working

Cheers!
7/4/2009 9:21 AM | stefb12
Comments have been closed on this topic.

Powered by: