@echo off
@setlocal enableextensions
@cd /d "%~dp0"
@setlocal enabledelayedexpansion
goto check_Permissions

:check_Permissions
    net session >nul 2>&1
    if %errorLevel% == 0 (
		SET "APP_HOME=%CD%\"
		%APP_HOME%ConnSolaceService.exe uninstall
	) else (
		echo ERROR: You need administrator privileges in order to start the service!
	)
pause