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

:check_Permissions
    net session >nul 2>&1
    if %errorLevel% == 0 (
		SET APIGATEWAY_HOME=C:\APIGateway\
		%APIGATEWAY_HOME%APIGatewayService.exe stop
	) else (
		echo ERROR: You need administrator privileges in order to start the service!
	)
pause