这篇文章上次修改于 938 天前,可能其部分内容已经发生变化,如有疑问可询问作者。
@echo off

chdir /d %~dp0

set dir=%~dp0

echo Windows Registry Editor Version 5.00> t1.reg

rem 文件右键菜单
echo [HKEY_CLASSES_ROOT\*\shell\DestroyApp]>> t1.reg 
echo @="粉碎文件" >> t1.reg
echo "Icon"="%dir:\=\\%Destroy.exe">> t1.reg

echo [HKEY_CLASSES_ROOT\*\shell\DestroyApp\command]>> t1.reg
echo @="%dir:\=\\%Destroy.exe %%1">> t1.reg

rem 文件夹右键菜单
echo [HKEY_CLASSES_ROOT\Directory\Background\shell\DestroyApp]>> t1.reg
rem 若是删除项
rem echo [-HKEY_CLASSES_ROOT\Directory\Background\shell\DestroyApp]>> t1.reg
echo @="粉碎文件夹">> t1.reg
echo "Icon"="%dir:\=\\%Destroy.exe">> t1.reg

echo [HKEY_CLASSES_ROOT\Directory\Background\shell\DestroyApp\command]>> t1.reg
echo @="%dir:\=\\%Destroy.exe %%V">> t1.reg

regedit /s %~dp0t1.reg
del /q t1.reg

pause