Notepad2 from Slax
Posted: Thu Mar 15, 2007 12:09 pm
TPFC Forums
https://www.portablefreeware.com/forums/
https://www.portablefreeware.com/forums/viewtopic.php?t=1562
Code: Select all
- /z command line switch (support registry-based Notepad replacement)
- Fixed some /p command line switch options not working properly
- New style setting to control font smoothing (see FAQ on my website)
- Hotkey to copy pathname of current file to clipboard (Shift+F9)
- Updated Scintilla library to 2.01-cvs $Date: 2009/12/16 $
And it Works!As of version 4.0.24, the official release of Notepad2 supports this method for replacing Windows Notepad, so the steps outlined above will work fine. However, there's no support to perform the Notepad replacement automatically, as the official release of Notepad2 will not modify the system registry. For the same reason, there's no support for accessing recent files through the Windows 7 jump lists (this requires registration of applications in the system registry, first). Also note that automated Notepad replacement could have undesirable effects if Notepad2 was used as a Notepad replacement from a portable device, and the original state was not restored after disconnecting the device.
A batch script to run from the Notepad2 directory and replace Windows Notepad might look like this (single line):
reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe" /v "Debugger" /t REG_SZ /d "\"%~dp0Notepad2.exe\" /z" /f
The Windows Notepad can be restored with this command (single line):
reg delete "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe" /f