- @echo off
- set hk=HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Setup
- for /f %%a in ('reg query "%hk%"^|findstr "REG_SZ"') do (
- for /f "tokens=3" %%b in ('reg query "%hk%" /v %%a^|findstr "REG_SZ"') do (
- if /i "%%b"=="x:\windows\123" reg delete "%hk%" /v "%%a" /f
- )
- )
- pause
复制代码 如果名称不包含空格的话就这样用吧
并且数据类型是REG_SZ |