@echo off
setlocal
title NetroTalk Desktop - Uninstaller
echo(
echo   ===  Uninstall NetroTalk Desktop  ===
echo(
set "APP=%LOCALAPPDATA%\Programs\NetroTalkDesktop"
echo   Closing the app...
taskkill /im NetroTalkDesktop.exe /f >nul 2>&1
taskkill /im NTalkDesktop.exe /f >nul 2>&1
if exist "%APP%\unins000.exe" (
  echo   Running the built-in uninstaller...
  "%APP%\unins000.exe" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART
) else (
  echo   Removing app files, shortcuts and startup entry...
  reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Run" /v "NetroTalk" /f >nul 2>&1
  reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\NetroTalkDesktop" /f >nul 2>&1
  del "%APPDATA%\Microsoft\Windows\Start Menu\Programs\NetroTalk Desktop.lnk" >nul 2>&1
  del "%USERPROFILE%\Desktop\NetroTalk Desktop.lnk" >nul 2>&1
  if exist "%APP%" rmdir /s /q "%APP%"
)
echo(
echo   NetroTalk Desktop has been removed.
echo(
pause
