最后一部分 好累
------------------------------------------------- ::开始测试是否存在53f5630d
- :check_53f5630d
- echo.
- echo 正在检测DeviceClasses\{53f5630d...}
- reg query HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\DeviceClasses\{53f5630d-b6bf-11d0-94f2-00a0c91efb8b} > test.txt
- if errorlevel 1 (
- if exist test.txt del test.txt
- echo.
- echo DeviceClasses\53f5630d不存在,跳过清除!
- ping 127.0.0.1 -n 1 > nul
- goto check_53f5630e
- )
- ::开始测试{53f5630d...}是否存在usb字符
- FOR /F "skip=1 tokens=3 delims=#" %%i in (test.txt) do (
- if %%i==USBSTOR goto del_53f5630d
- )
- echo 不存在USB记录!继续检测下一项
- if exist test.txt del test.txt
- goto check_53f5630e
- ::开始删除{53f5630d...}
-
- :del_53f5630d
- echo 开始删除{53f5630d...}
- for /f "skip=1 tokens=7 delims=\" %%i in ( test.txt ) do (
- reg delete HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\DeviceClasses\{53f5630d-b6bf-11d0-94f2-00a0c91efb8b}\%%i /F
- if errorlevel 1 (
- echo.
- echo %%i子项无法删除
- echo.
- )
- )
- if exist test.txt del test.txt
- echo.
- echo --------------------本项删除完毕----------------------
- echo.
- ping 127.0.0.1 -n 1 > nul
-
- :check_53f5630e
- echo.
- echo 正在检测DeviceClasses\{53f5630e...}
- reg query HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\DeviceClasses\{53f5630e-b6bf-11d0-94f2-00a0c91efb8b} > test.txt
- if errorlevel 1 (
- if exist test.txt del test.txt
- echo.
- echo DeviceClasses\53f5630e不存在,跳过清除!
- ping 127.0.0.1 -n 1 > nul
- goto end3
- )
-
- ::开始测试{53f5630a...}是否存在usb字符
- FOR /F " skip=1 tokens=3 delims=# " %%i in ( test.txt ) do (
- if %%i==USBSTOR goto del_53f5630e
- )
- echo 不存在USB记录!继续检测下一项
- if exist test.txt del test.txt
- goto end3
- ::开始删除{53f5630e...}
- :del_53f5630e
- echo 开始删除{53f5630e...}
- for /f "skip=1 tokens=7 delims=\" %%i in ( test.txt ) do (
- reg delete HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\DeviceClasses\{53f5630e-b6bf-11d0-94f2-00a0c91efb8b}\%%i /F
- if errorlevel 1 (
- echo.
- echo %%i子项无法删除
- echo.
- )
- )
- if exist test.txt del test.txt
- echo.
- echo --------------------本项删除完毕----------------------
- echo.
- ping 127.0.0.1 -n 1 > nul
- :end3
- echo.
- echo ---------------删除DeviceClasses完毕--------------
- echo.
- echo 个别子项如果出现无法删除的情况属于正常现象
- echo.
- echo 按任意键继续。。。
- pause > nul
- cls
- echo.
- echo.
- echo.
- echo **********************************************
- echo **************** U盘记录清除完毕 *************
- echo **********************************************
- echo.
- echo.
- echo 请使用“U盘记录检查工具”检测本机记录清除情况,亮子的空间里有提供下载!
- echo.
- echo.
- echo 感谢使用亮子编写的批处理脚本工具!按任意键退出!
- pause > nul
- Endlocal
- color
- exit
复制代码
|