I followed the instructions on the Notepad ++ site to totaly replace notepad will notepad++. As soon as I have copied the new notepadd++ exe file to replace the old notepad file in the folowing directories
* Copy notepad.exe which comes with this package into 3 directories (in given order) :
Windows seems to somehow replace the notepad++ file with the old notepad file.
Anyway if anyone knows why this is hapening and what I can do about it it would be appreciated.
This happen by the Windows XP file protection system!
I made (with AutoIt) a Notepad++ Replacer with a GUI for replacing MS-Notepad.exe with the N++ Launcher, that temporary disables Protection for MS-Notepad.exe.
Here is a screen NPP-GUI_eng.jpg:
Here you can download the file Notepad-Replacer_eng.exe:
Here you can download the scriptfile *.au3, if you would like to compile by yourself:
AutoIt Script home page http://www.autoitscript.com/
Extract i.E. in Notepad++ dir and run the Notepad-Replacer_eng.exe.
How it goes:
- it extracts to temp: n++_icon, n++_logo.gif, n++launcher and setup.exe
and run the setup.exe
- it requires Adminrights! in WinXP
- if a open session of the MS-Notepad.exe excist, will close in 20 sec.
- it makes a backup from the MS-Notepad.exe in 'Windir/Notepad-backup'
- it looks where the MS-Notepad.exe stored:
- it temporary disables Protection for MS-Notepad.exe and
replace it with the Notepad++ Launcher in given dir.
- it writes a logfile Notepad.log, where the script starts.
So have fun.
you may want to use an easier was for your WinXP, Vista, Win7, Win8 system:
I used the method with rerouting the call in registry.
It makes a blocking call, so that batch scripts are stop as with notepad.exe.
Feel free to comment on my project page.
I haven't tried Notepad-Replacer_eng.exe but have often installed NPPLauncher replacing the files in this order (the reverse of the instructions above) with great success:
I think an AutoIt program should work well, but I sometimes get antivirus alerts with AutoIt-based programs (using AVG antivirus btw), so I tend to avoid them from (no offense) unknown authors. I do know that Toshiba uses AutoIt from some of its tools but for whatever reason I've never had a false positive virus alert from any of them. I actually have, in the past, had trouble even installing AutoIt itself due to antivirus alerts, but I digress…
If the Notepad-Replacer_eng.exe is not your cup of tea try reversing the order in which you replace notepad.exe.
Yes. Apparently in Windows Vista after SP1 (and maybe in Windows 7 also), instructions for applying Notepad++ launcher (Windows Notepad replacement) are slightly different.
So, for each copy of "notepad.exe" (one is in '%windir%' and the other in '%windir%\system32'):
1. Edit the file permissions (context menu, properties, security)
1. Take ownership (to yourself or to your group);
2. Add full control of the file (to yourself or to your group).
2. Replace the file.
Instead of trying to overwrite it is much easier to add a single registry key that will redirect all attempts to edit notepad.exe
I think they call it an image hijack. I tried it works great. I didn't have to overwrite anything. I am running 64-bit windows. Don't know if 32-bit uses a different registry entry. Here is the key:
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe]
"Debugger"="\"C:\\Program Files (x86)\\Notepad++\\notepad++.exe\""
And the best place to look for all OS is on MediaWiki of N++:
Use the Registry version found on the main replacement page, but replace the VB Script text with the text below…..
'Make Sure that the Registry value points to the script file!!!
'Default Location for Notepad++ executable.
'For Best Results place this script in the same folder as exe and leave as default.
Filename = "Notepad++.exe"
If WScript.Arguments.Count = 3 Then
Filename = Filename + " " + chr(34) + WScript.Arguments(1) + " " + WScript.Arguments(2) + chr(34)
Set objShell = WScript.CreateObject("WScript.Shell")
Set objShell = Nothing