Windows Protected Files Replacement

Today I've disoverd Notepad2, a notepad replacement with syntax highlighting  for most popular languages,

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 ( ) and it's called replacer.

But it doesn't work 🙁

Comments (8)

  1. Wesner Moise says:

    You need to also replace copies of notepad in WindowsServicePackFilei386 instead of or in addition to dllcache.

    This is because SP2 can be uninstalled, so it has its own copies of all the dlls.

  2. If you followed those directions on precisely they won’t work. He says to add %windir%notepad.exe which should be %windir%system32notepad.exe.

    The alternate way to get around WFP is to open up a command prompt, type "pushd %windir%system32dllcache", 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.

  3. Sean says:

    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.

  4. Wes says:

    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:windowsnotepad.exe C:windowsnotepad1.exe

    XCopy /Y .notepad2.exe C:windowsSystem32dllcachenotepad.exe

    xCopy /Y .notepad2.exe C:windowsSystem32notepad.exe

    XCopy /Y .notepad2.exe C:windowsnotepad.exe

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



  5. Jeff Atwood says:

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

    copy notepad2.exe c:windowsservicepackfilesi386notepad.exe

    copy notepad2.exe c:windowssystem32dllcachenotepad.exe

    copy notepad2.exe c:windowssystem32notepad.exe

    copy notepad2.exe c:windowsnotepad.exe

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

  7. 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:winntservicepackfilesi386notepad.exe

    copy notepad2.exe c:winntsystem32dllcachenotepad.exe

    copy notepad2.exe c:winntsystem32notepad.exe

    copy notepad2.exe c:winntnotepad.exe

Skip to main content