分享

使用Notepad2替代系统笔记本

 dinghj 2019-04-17

刚在整理资料,突然发现我Ctrl+R命令然后notepad命令出来的记事本是Notepad2,于是找了一下,原来是以前弄过了使用Notepad2替代系统笔记本,于是就把我现在用的办法分享出来吧,希望能够帮助各位脱离微软万能不变的垃圾内置记事本吧(实在不明白为什么内置的就不肯升级= =

首先下面是我notepad2的目录文件:

notepad2目录

Notepad2_x64.exe 是主程序,这里使用的是:Notepad2-mod(64-bit) 4.2.25 r985(7529a6b)这版本,应该是别人汉化的一个版本,其主页地址为:https://xhmikosr./notepad2-mod/,可以到改主页下载需要的版本。

Notepad2_x64.ini 是程序配套的ini文件,一般就不用直接去改他吧,不过可以考虑设置好程序后对配置文件做备份吧。

替换系统记事本.bat 如名字所说,就是替换使用的脚本,要替换时运行该脚本即可,注意:1.要与notepad2程序同一目录;2.使用系统管理员权限运行。脚本内容如下:

@ECHO OFF
PUSHD %~DP0
taskkill /f /im notepad*>NUL 2>NUL
Md "%WinDir%\System32\test_permissions" 2>NUL||(Echo 请使用右键管理员身份运行&&Pause >NUL&&Exit)
Rd "%WinDir%\System32\test_permissions" 2>NUL
SetLocal EnableDelayedExpansion
if not exist "%WinDir%\SysWOW64" reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe" /v "Debugger" /t REG_SZ /d "\"%~dp0Notepad2.exe\" /z" /f
if exist "%WinDir%\SysWOW64" reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe" /v "Debugger" /t REG_SZ /d "\"%~dp0Notepad2_x64.exe\" /z" /f
exit

恢复系统记事本.bat 如名字所说,就是恢复系统原笔记本的脚本,内容如下:

@ECHO OFF
PUSHD %~DP0
taskkill /f /im notepad*>NUL 2>NUL
Md "%WinDir%\System32\test_permissions" 2>NUL||(Echo 请使用右键管理员身份运行&&Pause >NUL&&Exit)
Rd "%WinDir%\System32\test_permissions" 2>NUL
SetLocal EnableDelayedExpansion
reg delete "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe" /f
reg delete "HKLM\Software\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe" /f
exit


PS:我是在 WinXP 64位及Win10 64位下使用过的,都成功了,其他系统没有试过

PS2:脚本非原创,应该时我以前在其他地方找到了,不过我也找不到出处了

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约