设置
右键菜单
::===========================================================================
:: bdrun_admin.cmd version 0.0.1
::---------------------------------------------------------------------------
:: enable/disable notepad++ context menu
::
:: Copyright (c) 2016-2018 Anon Technologies, Inc. All rights reserved.
::===========================================================================
:: when who what, where, why
:: --------- --- ------------------------------------------------------
:: 2023-9-15 bob enable context menu by regedit
::===========================================================================@echo off
chcp 65001cd /d %~dp0title Notepad++ 石键菜单添加/删除工具
SetLocal EnableDelayedExpansionecho 1.添加 Notepad++ 右键菜单
echo --------------------------
echo 2.删除 Notepad++ 右键菜单
echo --------------------------Set /p u=请输入数字并按 Enter 确定:If "%u%"=="1" call :reg_npp_ctx_menu
If "%u%"=="2" call :unreg_npp_ctx_menugoto :eof:reg_npp_ctx_menuecho enable context menu for %cd%\notepad++.exereg add "HKEY_CLASSES_ROOT\*\shell\Notepad++" /t REG_SZ /v "" /d "Edit with &Notepad++" /freg add "HKEY_CLASSES_ROOT\*\shell\Notepad++" /t REG_EXPAND_SZ /v "Icon" /d "%cd%\notepad++.exe,0" /freg add "HKEY_CLASSES_ROOT\*\shell\Notepad++\command" /t REG_SZ /v "" /d "%cd%\notepad++.exe ""%%1""" /fpause
goto :eof:unreg_npp_ctx_menuecho disable context menu for %cd%\notepad++.exereg delete "HKEY_CLASSES_ROOT\*\shell\Notepad++" /fpause
goto :eof