本帖最后由 zhanglei1371 于 2017-8-16 11:41 编辑
可参考下这个修改下:- @echo off
- set /p dn=请输入安装程序名称关键字(例如:QQ):
- set rp=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
- for /f "tokens=*" %%a in ('reg query "%rp%"') do (
- for /f "tokens=*" %%l in ('reg query "%rp%\%%~na" /v "DisplayName"^|findstr /ir "abc.*"') do (
- call :show %%~na
- )
- )
- :show
- cls
- for /f "tokens=*" %%b in ('reg query "%rp%\%1" /v "InstallLocation"^|findstr /i "InstallLocation"') do (echo %%b)
- pause
- exit
复制代码
|