本帖最后由 batman 于 2012-3-28 22:00 编辑
运行下面代码当显示无误时将echo reg delete中的echo 去掉限可
删除注册表项有危险,请楼主慎重。。。- @echo off&setlocal enabledelayedexpansion
- set "regpath=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace"
- for /f "delims=" %%a in ('reg query "%regpath%"^|findstr "{"') do (
- for /f "delims=" %%b in ('reg query "%regpath%\%%~na" /ve^|findstr "REG_SZ"') do (
- set "str=%%b"
- if "!str:InternetExplorer=!" neq "!str!" echo reg delete "%regpath%\%%~na" /f
- )
- )
- pause>nul
复制代码
|