notepad++

设置

右键菜单

::===========================================================================
:: 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 65001

cd /d %~dp0

title Notepad++ 石键菜单添加/删除工具
SetLocal EnableDelayedExpansion

echo 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_menu

goto :eof

:reg_npp_ctx_menu
    echo enable context menu for %cd%\notepad++.exe
    reg add "HKEY_CLASSES_ROOT\*\shell\Notepad++" /t REG_SZ /v "" /d "Edit with &Notepad++" /f
    reg add "HKEY_CLASSES_ROOT\*\shell\Notepad++" /t REG_EXPAND_SZ /v "Icon" /d "%cd%\notepad++.exe,0" /f
    reg add "HKEY_CLASSES_ROOT\*\shell\Notepad++\command" /t REG_SZ /v "" /d "%cd%\notepad++.exe ""%%1""" /f
    pause
goto :eof

:unreg_npp_ctx_menu
    echo disable context menu for %cd%\notepad++.exe
    reg delete "HKEY_CLASSES_ROOT\*\shell\Notepad++" /f
    pause
goto :eof

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值