@echo off
rem DeploymentStore should be set to a writable and persistant directory location
rem setDeploymentEnv finds a DOS drive letter for a WinPE USB device if %DeploymentStore% does not exit
rem setDeploymentEnv assumes a DOS drive letter is first character in the path
set DeploymentStore=Z:\DeploymentStore
call %SystemDrive%\deploy\bin\setDeploymentEnv.cmd
call prepareDeployment
if not errorlevel 1 (
    call addLogRecord deploy.cmd INFO "Deployment started"
    call customDeployment
)
call evaluateDeployment
set ret=%ERRORLEVEL%
echo "finished deployment with error level %ret%"
call addLogRecord deploy.cmd INFO "Deployment finished with error level %ret%"

subst B: %BootDevice%\
set Path=%Path%;%BootDevice%\bin
If EXIST "B:\autorun.cmd"  call "B:\autorun.cmd"
REM setres 1280 1024
