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

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