- @echo off
- SetLocal EnableDelayedExpansion
- set FullKey=HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID
- set TempFile="%temp%\CLSID.reg"
-
- echo 正在导出 CLSID 下所有子项和值...
- reg query %FullKey% /s >%TempFile%
-
- echo 正在搜索...
- for /f "delims=:" %%a in ('findstr /nie HintBrowseA %TempFile%') do (
- set /a #Line# = %%a - 1
- set Command="findstr /n .* %TempFile% | findstr /b !#Line#!:"
- for /f "tokens=1,* delims=:" %%b in (' !Command! ') do (
- reg delete %%c /f >nul
- echo 删除成功!
- )
- ) 2>nul
-
- if not defined #Line# echo 没有找到
-
- del %TempFile%
- echo 按任意键退出...
- pause >nul
复制代码
|