Replace the system comes with Windows Notepad

Windows comes with Notepad to open some simple short text is good, but also the corresponding residue that comes with this notebook, such as search and replace functions, such as encoding format compatibility issues ...

In order to make it easier to use Notepad, we have a lot of alternatives, such as notepad2, notepad ++, ultraedit ...

Personally like notepad2-MOD , replace two, one directly renamed notepad.exe to replace the file, the other is the use of image hijacks, the name for the process of hijacking notepad.exe to our specific program, in order to achieve we want to open notepad2.exe start Notepad.

Replace file

There comes notepad.exe in Windows system parts 2-3, the system 64 is doubled, which is bound to a source, when the system finds notepad.exe system32 directory under Windows and does not match, the carrying its recovery.

For xp or 2003 version of the system, with the following batch to complete:

1
2
3
4
5
6
7
8
9
10

rem the notepad2.exe and batch release in the same directory
Copy notepad2.exe C: Windowssystem32dllcachenotepad.exe / the y-
Copy notepad2.exe c: Windowsnotepad.exe / the y-
Copy notepad2.exe c: Windowssystem32notepad.exe / the y-
rem notepad.ini is notepad2 .exe personality profile is ignored if not needed
Copy notepad.ini C: Windowsnotepad.ini / Y
Copy notepad.ini C: Windowssystem32notepad.ini / Y
echo replacement is completed
pause

If the System File Protection feature is not turned off, the system will replace the file changes prompted, point to retain the changes.

System version after Windows Vista system permissions control greatly strengthened, it is not as straightforward as replacing files under Windows xp, we need to set some additional privileges to the system.

I am here and that win8.1, permissions and win7 etc. are the same, must come to take ownership, you can change user permissions.

After the folder permissions set up, we will need notepad2.exe renamed notepad.exe, copy replace system files, if you want to restore later, it is recommended to rename the file system backup processing.

When prompted for a destination folder access denied, click on the "Continue" button can.

At this point, we have to replace the file is complete, the rest of the remaining files and so on.

After the replacement is completed, when we open the original file or txt associated notepad.exe, it will call the new notepad.exe to open, edit the page to see what's also ini formatted, syntax highlighting, not simply more comfortable ...

notepad2 have a name corresponding configuration can be achieved font settings, grammar theme settings and other personalized configuration, each notepad2 quit or ini file will be saved in the same directory F7 time. Also, because the system directory permissions problem, not notepad2 save the configuration, you can set if needed after stored elsewhere and copy it to the Windows system32 directory, because before notepad2 has been renamed notepad.exe, so ini name should be notepad.ini.

At this point, manually replace the system files to achieve notepad2 comes with Notepad replacement is complete.

Of course, if you need a lot of deployment, or when the packaging system to replace its own good, or you can try the next batch, from the Internet to find for a while, did not verify the feasibility of:

1
2
3
4
5
6
7
8
9
10
11
12
13
@ Echo OFF 
REM take ownership
takeown / f % SystemRoot% notepad.exe
takeown / f % SystemRoot% system32notepad.exe
taskkill / f / IM notepad.exe 2 > NUL
REM backup of the original file
REN % windir% notepad.exe notepad.exe. BAK
icacls % windir% Notepad.exe / Grant % username% : F / T
icacls % windir% system32notepad.exe / Grant % username% : F / T
Copy / Y Notepad.exe % windir%
Copy / Y Notepad.exe % windir % system32
echo replacement is completed
notepad

This batch consider only two goals notepad.exe, and only for 32-bit version of the system, modify it under his own little play.

Image hijacking

In fact notepad2 official installation package is used in image hijacks way, the advantage of this approach is not complex system privileges, nor damage to the file system, simple and convenient, it is recommended to use.

Manually modify the registry to achieve image hijacks the registry as follows:

1
HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionImage File Execution Options

This registry entry can realize the process name hijacking, the official registry as follows:

1
2
3
4
 Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionImage File Execution Optionsnotepad.exe]
"Debugger"=""C:\Program Files\Notepad2\Notepad2.exe" /z"

The registry looked very aware, when you open notepad.exe actually transferred notepad2.exe. Notepad2 the machine installed in the Program Files directory, change to change their own path to the directory where notepad2.exe own just fine. If I do not want to toss directly download the installation package it official: http://www.flos-freeware.ch/notepad2.html

To make it easier to use, we can add a use Notepad to open in the system right, when not done to open the associated document, you can use Notepad to open a direct right, providing a registry, the registry can be imported.

1
2
3
4
5
6
7
Registry Editor Version 5.00 Windows 
[HKEY_LOCAL_MACHINE S oftware C lasses * S Hell]
[HKEY_LOCAL_MACHINE S oftware C lasses * S Hell O penInNotepad]
; the right to display what name to write it ... loaded B to write the English ...
@ = " Notepad with the Open "
[HKEY_LOCAL_MACHINE S oftware C lasses * S Hell O penInNotepad C ommand]
@ =" Notepad.exe " %. 1" "

Alternative download Notepad

Windows Notepad that comes with ready-made alternatives visible: notepad2-MOD

Original: Large column  replaces Windows system comes with Notepad


Guess you like

Origin www.cnblogs.com/petewell/p/11614884.html