回复 12# wh123wh123 - @echo off
- for /f "delims=" %%i in ('reg query "HKCR\Directory\Background\shellex\ContextMenuHandlers" /k /f * ^| findstr /b "HKEY"') do (
- if /i "%%~nxi" == "Sharing" (
- echo;[Sharing]子项不需要删除
- ) else if /i "%%~nxi" == "New" (
- echo;[New]子项不需要删除
- ) else (
- reg delete "%%i" /f >nul 2>&1 && echo;[%%~nxi]子项删除成功 || echo;[%%~nxi]子项删除失败
- )
- )
- pause
复制代码
|