@echo off
rem *** Change to local drive and folder
cd /D %~Dp0
SET "SCRIPT_DIR=%~Dp0"
:: remove last backslash from %SCRIPT_DIR
set "SCRIPT_DIR=%SCRIPT_DIR:~0,-1%"
:: Load used Settings
if exist "%SCRIPT_DIR%\S01_BuildUserAndShares.cmd" call "%SCRIPT_DIR%\S01_BuildUserAndShares.cmd" LOAD_SETTINGS 
cd /D %~Dp0
TITLE Start Installation of BMA
SET "SCRIPT_DIR=%~Dp0"
:: remove last backslash from %SCRIPT_DIR
set "SCRIPT_DIR=%SCRIPT_DIR:~0,-1%"
SET "TMP_DIR=%SCRIPT_DIR%"
SET "TMP_FILE=%TMP_DIR%\Used_Settings.txt"
cls
echo.
echo ################################################
echo #
echo # Start Installation of 
echo #
echo #      BootManage Administrtator
echo #
echo ################################################
echo.
pause
start "" "%SCRIPT_DIR%\..\BMA\setup.exe"
cls

echo. > %TMP_FILE%
echo. >> %TMP_FILE%
echo #################################################### >> %TMP_FILE%
echo # Your Used Configuration >> %TMP_FILE%
echo #################################################### >> %TMP_FILE%
echo # >> %TMP_FILE%
if defined BMA_DEPLOY_USERNAME (
echo # Deployment user ^(installation user^) for helper operating system >> %TMP_FILE%
echo # The installation user is needed to access the base directory >> %TMP_FILE%
echo #   User name: %BMA_DEPLOY_USERNAME% >> %TMP_FILE%
echo #   Password: %BMA_DEPLOY_PASSWORD% >> %TMP_FILE%
echo #   Workgroup: Workgroup >> %TMP_FILE%
echo # >> %TMP_FILE%
echo # Share names >> %TMP_FILE%
echo #   Location path of the TFTP share: >> %TMP_FILE%
echo #   \\%COMPUTERNAME%\%BMA_TFTPBOOT_SHARE% >> %TMP_FILE%
echo #  >> %TMP_FILE%
echo #   Location path of the base share ^(depot^): >> %TMP_FILE%
echo #   \\%COMPUTERNAME%\%BMA_OSDEPOT_SHARE% >> %TMP_FILE%
echo #  >> %TMP_FILE%
)
if defined MTFTP (
echo # TFTP Server >> %TMP_FILE%
echo #   Program:   %PRG_DIR%\%MTFTP% >> %TMP_FILE%
echo #  >> %TMP_FILE%
)
echo #################################################### >> %TMP_FILE%
echo. >> %TMP_FILE%
echo.  >> %TMP_FILE%
start notepad "%TMP_FILE%"
