In Windows, notepad is frequently used, but it lacks the number of lines to display, and the script is not highlighted, so that sometimes the English spelling is wrong and I don't know (especially for people like me ). Although notepad in Vista is much easier to use, there is still no third-party notepad software, such as NotePad ++ and notepad2, so today, we need to replace notepad in XP and Windows 7 with a more powerful notepad2.
Windows XP:
If you don't talk about it, download the notepad2 Chinese version and save it on drive D. Decompress notepad2.exe to drive D, change it to notepad.exe, and copy it
C: \ windows \ system32 \ dllcache \, c: \ windows \ and
C: \ windows \ system32 (Note: remove the check box before tools-Folder-View-hide the protected folder and display all files and folders, otherwise, the system will jump out of the System File Protection prompt and select "yes" to see if it is different!
In fact, extract the package to drive D and directly create a notepad and copy the following code.
@ Echo off
Rename D: \ notepad2.exe notepad.exe
// The above sentence is to change the name. If the name is different, do not enter the seat number.
Copy D: \ notepad.exe % SystemRoot % \ system32 \ dllcache \/y
// Copy the file to the folder on the System Disk
Copy D: \ notepad.exe % SystemRoot % \/y
Copy D: \ notepad.exe % SystemRoot % \ system32 \/y
|
And save it as "notepad. BAT. bat, you do not need to replace the following storage type, directly Save the batch processing files, the same is true for other types of files), and then double-click to run, jump out of the above two figures and follow the above operations, you can also replace it (note that you cannot run any Notepad program when running the batch file), and modify the above Code according to the location where your notepad2 is stored.
Windows 7:
System disks in Windows 7 have special permissions. Even if you are an administrator, you cannot replace system files ..
However, there are still many ways to implement replacement. The specific methods are not listed one by one. The following is a script file to be replaced using system commands.
Replace notepad with notepad2 with the following script:
@ Echo off Takeown/f c: \ windows \ notepad.exe Takeown/f c: \ windows \ system32 \ notepad.exe ECHO before this .. Save all the opened notepad files .. Pause ECHO is finishing the notepad process... Taskkill/f/IM notepad.exe 2> NUL Echo back up the system notepad to drive c... Copy/Y % WinDir % \ notepad.exe c :\ Icacls % WinDir % \ notepad.exe/grant % username %: F/T Icacls % WINDIR % \ system32 \ notepad.exe/grant % username %: F/T Copy/y notepad.exe % WINDIR % Copy/y notepad.exe % Windir % \ system32 Echo replaced Notepad |