@ECHO OFF
CD /D %~DP0

SET CLASSPATH=lib\EMS.jar;lib\mssql-jdbc-6.4.0.jre7.jar
SET cmd=jre\bin\javaw com.ctcu.nms.setup.SetupFrame

IF "%ProgramFiles(x86)%" == "" (
    ECHO.    
    ECHO EMS is not supported on 32-bit platform.
    ECHO.
    PAUSE
) ELSE (    
    ECHO.
    ECHO EMS installation... 
    IF EXIST scripts\jenv.bat (
        REM EMS installed.
        START %cmd%
    ) ELSE (
        REM CD installing. CD installer reads install property after bat program exit. 
        %cmd% -lang EN
    )
)



