Create the following registry key:
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe
If it cannot be modified, right-click to obtain the permission;
In the notepad.exe registry key, create a string value named debugger (reg_sz );
Modify the data in the "debugger" string to the complete path of notepad2.exe and end with the/Z parameter.
For example:
"C:\Program Files\Notepad2.exe" /z
Or directly create the following registry file and then import it:
Windows Registry Editor Version 5.00[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe]"Debugger"="\"C:\\Program Files\\Notepad2.exe\" /z"
Notepad2 Original: http://www.flos-freeware.ch/notepad2.html
Notepad2-mod: http://code.google.com/p/notepad2-mod/
Replacing Windows notepad with notepad2:
Http://www.flos-freeware.ch/doc/notepad2-Replacement.html
Use Image hijacking to replace notepad with notepad2