windows 查找注册表未卸载软件的办法

powershell 查找注册表未卸载软件

$path = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall'
gci $path |? {$_.GetValue('DisplayName') -match 'StackOverflow'} | del

bat 查找注册表未卸载软件

set /p dn=请输入安装程序名称关键字(例如:QQ):
set rp=HKEY_LOCAL_MACHINE\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 /i "%dn%"') do (
call :show %%~na
)
)
:show
cls
echo "%rp%\%1" >>d:\test.log
pause

你可能感兴趣的:(windows)