Welcome to MSDN Blogs Sign in | Join | Help

Just Coding

Spanish Developer Bits
Windows Protected Files Replacement
Today I've disoverd Notepad2, a notepad replacement with syntax highlighting  for most popular languages,  http://www.flos-freeware.ch/notepad2.html.

I build it in my own box, and now I'm ready to try to replace the original notepad.exe, I'm following this instructions  but it does not work after WXP SP2 is installed.

Now I'm trying with a replacement toll found here (http://www3.telus.net/_/replacer/ ) and it's called replacer.

But it doesn't work :-(
Posted: Sunday, October 10, 2004 8:45 PM by rido
Filed under:

Comments

Wesner Moise said:

You need to also replace copies of notepad in Windows\ServicePackFile\i386 instead of or in addition to dllcache.

This is because SP2 can be uninstalled, so it has its own copies of all the dlls.
# October 10, 2004 9:11 PM

Anonymous Coward said:

If you followed those directions on http://blogs.msdn.com/omars/archive/2004/04/30/124093.aspx precisely they won't work. He says to add %windir%\notepad.exe which should be %windir%\system32\notepad.exe.

The alternate way to get around WFP is to open up a command prompt, type "pushd %windir%\system32\dllcache", and delete the file that Windows wants to protect. Then go ahead and replace notepad.exe with notepad2.exe.

You'll then get some UI from Windows asking you for your original Windows CD - just tell it no, I'll live with the missing file.

Before you do tha though you should be aware that notepad2 sucks through terminal services and is slower at searching than normal notepad (and can't search up). So as scary as it may seem, in some cases real notepad.exe wins.

# October 10, 2004 9:17 PM

Sean said:

I copied them by hand, and had no problems under SP2. But I will mention that I gave up on NotePad2. Great tool, EXCEPT for the Find/Search capability. A large file (over 1000 lines) can take upto a minute to do a simple search on. I reinstalled the old Notepad.
# October 10, 2004 11:38 PM

Wes said:

I'm also running XP SP2 and I simply wrote a batch file to replace the file because it seems like you need to do all the replacements pretty quickly in order to be successful. The batch file looks like this:

XCopy C:\windows\notepad.exe C:\windows\notepad1.exe
XCopy /Y .\notepad2.exe C:\windows\System32\dllcache\notepad.exe
xCopy /Y .\notepad2.exe C:\windows\System32\notepad.exe
XCopy /Y .\notepad2.exe C:\windows\notepad.exe

If this doesn't work for you then you may also try to disable System Restore (at least temporarily).

HTH
Wes
# October 11, 2004 1:10 AM

Jeff Atwood said:

Here's the batch file I use, last time I used it under XP SP2, it worked..

copy notepad2.exe c:\windows\servicepackfiles\i386\notepad.exe
copy notepad2.exe c:\windows\system32\dllcache\notepad.exe
copy notepad2.exe c:\windows\system32\notepad.exe
copy notepad2.exe c:\windows\notepad.exe
# October 11, 2004 1:23 AM

Kevin Pilch-Bisson said:

You could try setting the Debugger flag for Image File Execution Options, as suggested in this blog:

http://blogs.msdn.com/shawnfa/archive/2004/10/06.aspx
# October 11, 2004 1:57 AM

Fernando Cortés said:

I use the Jeff's batch file, but I changed the window folder to winnt. It worked too...

My OS is Windows 2000 Advanced Server


copy notepad2.exe c:\winnt\servicepackfiles\i386\notepad.exe
copy notepad2.exe c:\winnt\system32\dllcache\notepad.exe
copy notepad2.exe c:\winnt\system32\notepad.exe
copy notepad2.exe c:\winnt\notepad.exe
# October 20, 2004 3:52 PM

who IS jake? said:

# July 7, 2005 9:12 AM
New Comments to this post are disabled
Page view tracker