Ниже приведен пример, который удаляет все установленные приложения, названия которых начинается с «Windows Live ID Sign-in Assistant»
for /f "tokens=7 delims=\" %%i in ('reg query HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall ^| FIND "{"') do
(
for /f "tokens=2,*" %%j in ('reg query HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\%%i /v DisplayName') do
(
set dn=%%k
if "!dn:~0,33!"=="Windows Live ID Sign-in Assistant"
(
echo Uninstalling Windows Live ID Sign-in Assistant
msiexec /promptrestart /qb /x %%i /L+*v %TEMP%\wlidsvc.log
if %ERRORLEVEL% NEQ 0 echo Uninstallation failed. Check the log %TEMP%\wlidsvc.log
)
)
)