@echo off
REM change folder to current batch file location
REM cd/d "%~dp0"

REM Generate current batch name for logfile
Set "LogFileName=%~dp0%~n0.log"
@echo Log Time: %date% %time%>>"%LogFileName%"
Set LogActions=^>^>"%LogFileName%"



REM check file unins000.exe exist in TouchUtility folder
IF NOT EXIST "C:\TouchUtility\unins000.exe" (echo !!CHECK FOLDER!! unins000.exe file is not exist in default folder "c:\TouchUtility" %LogActions%)&(goto END)
REM echo current foler: %cd% %LogActions%
REM where /r c:\ TouchUtility.exe>location.txt
REM where /r "C:\Program Files (x86)" TouchUtility.exe
pushd C:\TouchUtility
echo Uninstall start with silent command...
REM /silent(progress bar) or /VERYSILENT(without any prompt)
unins000.exe /verysilent
echo Uinstall End...%LogActions%
popd
echo Back to previous foler: %cd% %LogActions%


echo.
If "%errorlevel%"=="0" (echo 0: command line parameter was used completed successfully.%LogActions%) & (goto END)
echo.
echo Uninstall fail%LogActions%
goto END

:UnexistUninstallationFile
echo.
echo TouchUtilityUninstall.exe is not exist%LogActions%
echo.
exit
goto :eof

:END
echo uninstall.bat exit.%LogActions%
echo %errorlevel%
REM exit /B "%errorlevel%