The problem is that Windows protects many of its utility files located under the c:\windows or c:\winnt directory. Each time you overwrite one it gets deleted and replaced with a protected version under Windows control. So how do we get around it? Rest assured the answer is here.
Special thanks go to Omar Shahine’s WebLog for providing the solution. It took me a while to find it, so hopefully this one will contain more of the words you are looking for.
Window’s default text editor is notepad so we are going to rename our favourite text editor to the same name.
move notepad2.exe notepad.exe
Open a command window and run the following batch commands to rename the orginal notepad files and copy in the new version.
cd <locate of your version of notepad>
move %WINDIR%\system32\dllcache\notepad.exe %WINDIR%\system32\dllcache\notepad_orginal.exe
copy notepad.exe %WINDIR%\system32\dllcache
move %WINDIR%\system32\notepad.exe %WINDIR%\system32\notepad_orginal.exe
copy notepad.exe %WINDIR%\system32
move %WINDIR%\notepad.exe %WINDIR%\notepad_orginal.exe
copy notepad.exe %WINDIR%
A message to the effect of “Files that are required for Windows to run have been replaced…” pops up for each file that is replaced. This is Windows noticing that the notepad is different so just click cancel, and confirm that you are sure.
Windows accepts the change and doesn’t ask again.
If you are upgrading then run the following :
move notepad2.exe notepad.exe
del /f %WINDIR%\notepad.exe
copy notepad.exe %WINDIR%
del /f %WINDIR%\system32\dllcache\notepad.exe
copy notepad.exe %WINDIR%\system32\dllcache
del /f %WINDIR%\system32\notepad.exe
copy notepad.exe %WINDIR%\system32
Note:
Some versions of Windows are funny about replacing notepad and even replacing the copy in the ddlcache eventually changes back to the original notepad. I did a search and found all these copies of notepad. Add the following lines to a file called install.bat
and run it.
copy /y notepad2.exe %WINDIR%\system32\dllcache\notepad.exe
copy /y notepad2.exe %WINDIR%\system32\notepad.exe
copy /y notepad2.exe %WINDIR%\notepad.exe
copy /y notepad2.exe %WINDIR%\LastGood\notepad.exe
copy /y notepad2.exe %WINDIR%\LastGood\system32\notepad.exe
copy /y notepad2.exe %WINDIR%\ServicePackFiles\i386\notepad.exe
Better explanation here:
http://www.flos-freeware.ch/doc/notepad2-Replacement.html
Or even simpler you can use Binary Fortress’ Notepad Replacer which you can download for free:
http://www.binaryfortress.com/NotepadReplacer/