本帖最后由 apang 于 2012-10-23 22:25 编辑
- @echo off
- set "v_reg=HKEY_LOCAL_MACHINE\SOFTWARE\游戏公司名称"
- for /f "delims=" %%a in ('reg query "%v_reg%" 2^>nul^|find /i "%v_reg%\"') do (
- set /a n+=1
- if /i "%%~na"=="游戏1" set /a "n-=1"&echo,reg delete "%%a" /f
- )
- if "%n%"=="0" echo,reg delete "%v_reg%" /f
- pause
复制代码
|