@echo off

echo INFO: start uninstalling forcont Desktop Integration 7.
if not exist "%ProgramFiles%\forcont Desktop Integration 7\Uninstall forcont Desktop Integration 7.exe" (
  echo INFO: forcont Desktop Integration 7 is not installed, so there's nothing to be done.
) else (
  "%ProgramFiles%\forcont Desktop Integration 7\Uninstall forcont Desktop Integration 7.exe" /S > NUL 2>&1
  if not errorlevel 1 (
    echo INFO: forcont forcont Desktop Integration 7 has been successfully uninstalled.
  ) else (
    echo ERROR: failed to uninstall forcont Desktop Integration 7!
    exit /B 1
  )
)

echo INFO: start uninstalling forcont Desktop Connector.
if not exist "%ProgramFiles%\forcont desktop connector\Uninstall forcont desktop connector.exe" (
  echo INFO: forcont Desktop Connector is not installed, so there's nothing to be done.

) else (
  "%ProgramFiles%\forcont desktop connector\Uninstall forcont desktop connector.exe" /S > NUL 2>&1
  if not errorlevel 1 (
    echo INFO: forcont Desktop Connector has been successfully uninstalled.
  ) else (
    echo ERROR: failed to uninstall forcont Desktop Connector!
    exit /B 2
  )
)
exit /B 0