@echo off
rem this script puts everything in place ...

set TOOLS=c:\tools
set SXS=%WINDIR%\sources\sxs
set BATCH=%TOOLS%\scripts\autoconfig-all.cmd
set LOG=c:\CustomSetup.txt

del /F %LOG% 1>nul 2>nul
if not "%1"=="STDOUT_TO_FILE" %0 STDOUT_TO_FILE %* 1>%LOG% 2>&1
shift /1

echo ####### %0 #######
date /t
time /t
echo.

rem WARNING: DO NOT KILL windows explorer here!
rem   Explanation: Doing this will result in a crippled
rem   windows defender configuration! (the app to open it will not be present)

echo copying folder %TOOLS% ...
robocopy tools %TOOLS% /MIR /256 /NJH /NFL /NDL
echo.

echo copying folder %SXS% ...
robocopy sources\sxs %SXS% /MIR /256 /NJH /NFL /NDL
echo.

echo starting %BATCH% ...
call %BATCH%
echo.

date /t
time /t
echo ####### %0 #######
echo READY.
echo.