2011年8月4日星期四

Replace notepad by notepad++ on Win7



    * Backup your original Notepad.exe (we never know...).

    * Copy notepad.exe which comes with this package into 3 directories (in given order) :
         1. C:\Windows\SysWOW64
         2. c:\Windows\System32
         3. c:\Windows
      When you replace notepad.exe in c:\windows\system32 and c:\windows, a "Windows File Protection" message box appears, click Cancel. Then another message box appears, click OK.

    * [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe]
    * [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe]
* modify (or create if not exisiting) the subkey "Debugger" and its string value (REG_SZ) as "C:\Program Files (86)\Notepad++\Notepad++.exe"

** The 'Image File Execution Options' registry key is used by the NT family originally for debugging applications. Conveniently, we can use this method to run another command and pass the name of the executable to it instead. The problem is that you need some way to execute a command but skip one argument since most applications are not aware that one parameter is meaningless.

    * Modify you registry (if you use installer to install your Notepad++, you don't need to do this step): Create key \HKEY_LOCAL_MACHINE\SOFTWARE\Notepad++, then add your Notepad++ full path as the default value of this key. In my case, it's C:\Program Files (86) \Notepad++.

Now Notepad++ is your default Notepad. Enjoy.

    * a helpful info from Notepad++ wiki (http://sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=Replacing_Notepad)

0 意見:

最酷的Web相片欣賞工具 CoolIris