1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
| @echo off rem 关闭命令提示符回显,使批处理文件运行时不显示命令行的具体内容 set dn=Info rem 设置变量dn为Info set dn2=ShellFolder rem 设置变量dn2为ShellFolder set rp=HKEY_CURRENT_USER\Software\Classes\CLSID rem 设置变量rp为注册表路径HKEY_CURRENT_USER\Software\Classes\CLSID
rem 删除Navicat Premium 17的注册信息(此行被注释掉) rem reg delete HKEY_CURRENT_USER\Software\PremiumSoft\NavicatPremium\Registration14XCS /f %针对<strong><font color="#FF0000">navicat</font></strong>15%
reg delete HKEY_CURRENT_USER\Software\PremiumSoft\NavicatPremium\Registration17XCS /f
rem 删除Navicat Premium 17的注册信息 reg delete HKEY_CURRENT_USER\Software\PremiumSoft\NavicatPremium\Update /f
rem 删除Navicat Premium的更新信息
rem echo finding..... rem 输出“finding.....”到控制台
for /f "tokens=*" %%a in ('reg query "%rp%"') do ( rem 查询rp路径下的所有子项,并对每个子项执行以下操作 rem echo %%a rem 输出当前查询的子项路径 for /f "tokens=*" %%l in ('reg query "%%a" /f "%dn%" /s /e ^| findstr /i "%dn%"') do ( rem 在当前子项路径下查询包含"Info"的子项路径 rem echo deleting: %%a rem 输出“deleting: 当前子项路径” reg delete %%a /f rem 删除当前子项 ) for /f "tokens=*" %%l in ('reg query "%%a" /f "%dn2%" /s /e ^| findstr /i "%dn2%"') do ( rem 在当前子项路径下查询包含"ShellFolder"的子项路径 rem echo deleting: %%a rem 输出“deleting: 当前子项路径” reg delete %%a /f rem 删除当前子项 ) )
echo re trial done! rem 输出“re trial done!”到控制台
pause rem 暂停批处理文件的执行,等待用户按任意键继续
exit rem 退出批处理文件
|