HandBrake 1.0.7 silent uninstall

This will:
  • uninstall any version of HandBrake on 64-bit windows
  • uninstall any version of HandBrake on 32-bit windows

silent-uninstall.cmd
@echo off
set sw=HKLM\SOFTWARE
set u=Microsoft\Windows\CurrentVersion\Uninstall
set k=HandBrake
if not "%ProgramFiles(x86)%"=="" set x=Wow6432Node\
for /f "tokens=*" %%a in ('^
reg query "%sw%\%x%%u%\%k%" /v UninstallString ^|
find "UninstallString"') do set "str=%%a"
set "first=%str:    REG_SZ    =" & set "UninstallString=%"
start /wait "" "%UninstallString%" /S

No comments: