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
)
)
)
Source: https://habr.com/ru/post/84208/
All Articles