@Echo off

set CmdCurRoot=%~dp0
set CmdCurRoot=%CmdCurRoot:~0,-1%
set NxCheckBox_Exe_DPNE=%~1
set NxCheckBox_Exe_N=%~n1

REM NxCheckBox_64_bit_Nx75
if /i "%NxCheckBox_Exe_N:~0,22%" equ "NxCheckBox_64_bit_Nx75" set UGII_BASE_DIR=%UGII_BASE_DIR:85=75%
set UGII_ROOT_DIR=%UGII_BASE_DIR%\ugii
set PATH=%UGII_BASE_DIR%;%UGII_ROOT_DIR%;%CmdCurRoot_DP%;%PATH%
REM Echo path %path%
Echo UGII_BASE_DIR.......: [%UGII_BASE_DIR%]
Echo UGII_ROOT_DIR.......: [%UGII_ROOT_DIR%]
Echo NxCheckBox_Exe_DPNE.: [%NxCheckBox_Exe_DPNE%]
pause

if not exist "%NxCheckBox_Exe_DPNE%" goto :ExitErr

 rem --- Help txt ---
 set NxCheckBoxHelp_DPNE=%~dpn1_Help.txt
 rem execute get help
 call %NxCheckBox_Exe_DPNE%>"%NxCheckBoxHelp_DPNE%"
 set NxCheckBox_ErrLevel=%ERRORLEVEL%
 echo --------------------------------------------------------------------------
 echo Result:
 Echo  Executing Errorlevel:[%NxCheckBox_ErrLevel%]
 Echo  Type Help
 type "%NxCheckBoxHelp_DPNE%"

Goto :End

REM Type "%NxCheckBoxHelp_DPNE%"
:ExitErr
 Echo err cannot get Help
 Echo Posible Reasons:
 Echo - Parameter P1 not given
 Echo - cannot find NxCheckBox_Exe
 Echo P1 = "%1"
 Echo P2 = "%2"

 goto :end

:End
pause


