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

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