|
|
我是直接写了批处理,添加右键菜单
@echo off
echo 1. 添加右键菜单
echo 2. 删除右键菜单
echo 3. 退出
echo.
echo 请选择一个选项:
set /p M=
if "%M%"=="1" goto AddMenu
if "%M%"=="2" goto DelMenu
if "%M%"=="3" Exit
:AddMenu
%systemroot%\system32\Reg.exe add "HKEY_CLASSES_ROOT\*\shell\Notepad++" /v "Icon" /t REG_SZ /d "%~dp0\Notepad++.exe,0" /f
%systemroot%\system32\Reg.exe add "HKEY_CLASSES_ROOT\*\shell\Notepad++" /ve /t REG_SZ /d "用Notepad++打开" /f
%systemroot%\system32\Reg.exe add "HKEY_CLASSES_ROOT\*\shell\Notepad++\command" /ve /t REG_SZ /d "%~dp0\Notepad++.exe %%1" /f
%systemroot%\system32\Reg.exe add "HKEY_CLASSES_ROOT\directory\shell\Notepad++" /ve /t REG_SZ /d "用Notepad++打开" /f
%systemroot%\system32\Reg.exe add "HKEY_CLASSES_ROOT\directory\shell\Notepad++" /v "Icon" /t REG_SZ /d "%~dp0\Notepad++.exe,0" /f
%systemroot%\system32\Reg.exe add "HKEY_CLASSES_ROOT\directory\shell\Notepad++\command" /ve /t REG_SZ /d "%~dp0\Notepad++.exe %%1 -openFoldersAsWorkspace" /f
Exit
:DelMenu
%systemroot%\system32\Reg.exe delete "HKEY_CLASSES_ROOT\*\shell\Notepad++" /f
%systemroot%\system32\Reg.exe delete "HKEY_CLASSES_ROOT\directory\shell\Notepad++" /f
Exit
|
|