批量删除注册表

微软注册表命令说明

建立 bat文件  如 :DelBaidu.bat

写入一下内容

 

for /f "delims=" %%k in ('reg query HKCR /s /f Baidu /k')

do (
reg delete "%%k" /f
echo "%%k"
)


for /f "delims=" %%k in ('reg query HKCU /s /f Baidu /k') 

do (
reg delete "%%k" /f
echo "%%k"
)


for /f "delims=" %%k in ('reg query HKLM /s /f Baidu /k') 

do (
reg delete "%%k" /f
echo "%%k"
)


for /f "delims=" %%k in ('reg query HKU /s /f Baidu /k') 

do (
reg delete "%%k" /f
echo "%%k"
)


for /f "delims=" %%k in ('reg query HKCC /s /f Baidu /k') 

do (
reg delete "%%k" /f
echo "%%k"
)

cmd /k

 

经过上面这五条语句的删除后,其实属于键值名或键值数据里含"Baidu"的很多键值也随之而被删除掉了。

 

posted @ 2022-04-02 11:39  淮雨清青  阅读(1557)  评论(0编辑  收藏  举报