@echo off&setlocal enabledelayedexpansion
cd /d %~dp0
for /f "tokens=7* delims=\" %%i in ('reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall') do (
echo 当前扫描信息: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\%%~i
reg export "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\%%~i" reg.$ >nul
for /f "delims=" %%j in ('type reg.$ ^| findstr /i /c:"DisplayName" 2^>nul') do (
set DN=%%~j
set DN=!DN:"=!
set !DN!
)
for /f "delims=" %%k in ('type reg.$ ^| findstr /i /c:"InstallLocation" 2^>nul') do (
set IL=%%~k
set IL=!IL:"=!
set IL=!IL:\\=\!
set !IL!
)
if not defined DisplayName set DisplayName=没有信息。
if not defined InstallLocation set InstallLocation=没有信息。
(echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
echo 注册表值: %%~i
echo 软件名称: !DisplayName!
echo 安装路径: !InstallLocation!
echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
echo,)>>applist.txt
set DisplayName=&set InstallLocation=&del reg.$
)
pause
网页链接