@echo off
setlocal
title NetroApply Desktop - Uninstaller
echo(
echo   ===  Uninstall NetroApply Desktop  ===
echo(
echo   Closing the app...
taskkill /im NetroApplyDesktop.exe /f >nul 2>&1
set "APP=%LOCALAPPDATA%\Programs\NetroApplyDesktop"
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 "NetroApply" /f >nul 2>&1
  reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Run" /v "NetroApplyDesktop" /f >nul 2>&1
  del "%APPDATA%\Microsoft\Windows\Start Menu\Programs\NetroApply Desktop.lnk" >nul 2>&1
  del "%USERPROFILE%\Desktop\NetroApply Desktop.lnk" >nul 2>&1
  for %%D in ("%LOCALAPPDATA%\Programs\NetroApplyDesktop" "%LOCALAPPDATA%\Programs\NetroApplyDesktop-win32-x64" "%USERPROFILE%\NetroApplyDesktop") do if exist "%%~D" rmdir /s /q "%%~D"
)
echo(
echo   NetroApply Desktop has been removed.
echo   NetroApply Desktop is portable - if you unzipped it to another folder,
echo   delete that folder manually to finish.
echo(
pause
