shahine.com/omar/

homepage | Send mail to the author(s) contact

yet another Microsoft blogger

 Friday, April 30, 2004

How to replace notepad.exe with notepad2.exe

Thanks to some great comments and a specific one from James I have now replaced notepade.exe with the vastly superior notepad2.exe and prevented Windows File Protection from replacing the new notepad.

Here are the steps (warning, process with care, no warranties etc):

Method 1

1) Rename Notepad2.exe to Notepad.exe
2) go to %windir%\system32
3) Rename Notepad.exe to NotepadX.exe
4) go to %windir%\system32\Restore
5) Turn off hide invisible files in Tools->Folder Options->View
6) Select filelist.xml and right click->Properties and uncheck Read-only
7) Edit the file
8) Add:

<REC>%windir%\notepad.exe</REC>

to:

<Exclude>
    <REC>%windir%\system.ini</REC>
    <REC>%windir%\tasks\desktop.ini</REC>
    <REC>%windir%\win.ini</REC>
    <REC>*:\AUTOEXEC.BAT</REC>
    <REC>*:\CONFIG.MSI</REC>
    <REC>*:\CONFIG.SYS</REC>
</Exclude>

9) copy the newly renamed notepad2.exe (now named notepad.exe) to %windir%\system32

note: it turns out that for some folks, this doesn't work. It did not work for me on my tablet pc. Thanks to Shakeel Mahate here is method #2.

Method 2

  1. Tools->Folder Options->View uncheck Hide protected operating system files. 
  2. rename Notepad2.exe notepad.exe 
  3. copy notepad.exe %windir%/system32\dllcache 
  4. copy notepad.exe %windir%/system32 
  5. A dialog will popup hit cancel 
  6. Recheck Hide protected operating system files in the Folder Options dialog box

The dllcache contains copies of the windows protected files. The dllcache isnt itself protected.

 

Sunday, May 02, 2004 12:32:41 AM (Pacific Standard Time, UTC-08:00)
hi

I tried the above steps but windows still replaces the notepad.exe

any ideas?

TIA
ramesh
Ramesh
Sunday, May 02, 2004 11:12:22 AM (Pacific Standard Time, UTC-08:00)
Yes, it seems that this method doesn't work on Windows Server 2003 or SP2 of XP. Are you running either? Or maybe it doesn't work for machines joined to a domain? Anyway, here are some other ways to go about it:

http://blogs.msdn.com/omars/archive/2004/04/30/124093.aspx#124619
Saturday, May 08, 2004 1:11:41 PM (Pacific Standard Time, UTC-08:00)
I got Windows 2000. Neither the first or the second solution works. After some digging and guessing it turned out that if your intall path is available (ie. you got the i386 folder where Windows looks for it, usually CD, but I got tired of inserting on config changes, so I copied the whole i386 folder to C:\WINNT\Options and set the install path in registry to point to that, some OEMs do the same). Anyway when I did solutino#2 I never got setp#5. It went ahead and replaced it all with original Notepad.exe.

So for me
1. Tools->Folder Options->View uncheck Hide protected operating system files.
2. rename Notepad2.exe notepad.exe
3. Bork up the install path (I renamed C:\WINNT\Options\i386 to C:\WINNT\Options\ii386)
4. copy notepad.exe %windir%/system32\dllcache
5. copy notepad.exe %windir%/system32
6. A dialog will popup hit cancel (now it really will)
7. Unbork up the install path (I renamed C:\WINNT\Options\ii386 to C:\WINNT\Options\i386)
8. Recheck Hide protected operating system files in the Folder Options dialog box
Peter Lada
Tuesday, October 12, 2004 7:53:32 PM (Pacific Standard Time, UTC-08:00)
It wouldn't work for me either. But I got it to work.

First Replace it in windows\ServicePackFiles, then dllcache, windows\system32, windows

But now that I think about it, I did all the above also, so I guess I also edited the filelist.xml.

But after doing all that I did get it to work.

Hope that helps someone out.

Brian
Monday, August 15, 2005 9:27:14 AM (Pacific Standard Time, UTC-08:00)
Thanks Brian, your extra tip about the ServicePackFiles worked. I didn't do the filelist.xml bit so it does not seem to be neccesary.

I am on Windows XP with SP2.
Name
E-mail
(will show your gravatar icon)
Home page

Comment (Some html is allowed: a@href@title, b, blockquote@cite, em, i, strike, strong, sub, super, u) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Live Comment Preview