@echo on
chcp 65001
set software_name=Notepad++
set reg_key=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\%software_name%
set value_name=UninstallString
for /f "tokens=2*" %%a in ('reg query "%reg_key%" /v "%value_name%" ^| findstr /i "%value_name%"') do set uninstall_string=%%b
echo %uninstall_string%