用notepad++替换系统自带的记事本notepad

Replace Notepad
Notepad is a default text editor shipped with Windows. You may want to use Notepad++ instead of Notepad. However, there's no obvious way to do it.
From the version 7.5.9 you can run the following command to make Notepad++ replace Notepad (run in cmd.exe with Administrator privileges):

notepad记事本是windows默认的文本编辑器。从Notepad++ 7.5.9这个版本开始你可以通过以下命令将Notepad++设置为Windows默认编辑器。注意:命令需要管理员权限执行。

reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe" /v "Debugger" /t REG_SZ /d "\"%ProgramFiles(x86)%\Notepad++\notepad++.exe\" -notepadStyleCmdline -z" /f

如果你安装的是64位的Notepad++,需要把"%ProgramFiles(x86)%\Notepad++\"替换为"%ProgramFiles%\Notepad++\"。

如果需要重置为记事本,管理员权限运行以下命令:

reg delete "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe" /v "Debugger" /f

标签: Windows, Notepad++

添加新评论