CALL C:\LiveDigital\config.bat

DEL C:\LiveDigital\ftp-process.txt
DEL C:\LiveDigital\timer.txt
DEL C:\LiveDigital\request.txt

PING 127.0.0.1 -n 4 -w 500

IF EXIST C:\wamp\bin\apache\apache2.4.17\bin\httpd.exe (
	IF "%var_interactive%"=="1" (
		START /B C:\wamp\bin\apache\apache2.4.17\bin\httpd.exe
		PING 127.0.0.1 -n 4 -w 500
	)
)

net stop wuauserv
net stop WinDefend

taskkill /im explorer.exe /f

IF "%var_is64%"=="1" (
	START /B C:\LiveDigital\tools\bandwidth\64-bit\networx.exe
) ELSE (
	START /B C:\LiveDigital\tools\bandwidth\32-bit\networx.exe
)

START /B C:\LiveDigital\displays.bat

TIMEOUT 2

START /B C:\LiveDigital\sfc.bat
START /B C:\LiveDigital\pingcheck.bat

TIMEOUT 2

START /B C:\LiveDigital\mouse-hide.bat

schtasks /delete /tn "Timer ON" /f
schtasks /delete /tn "Timer OFF" /f

IF "%var_softwaretimers%"=="1" (
	schtasks /delete /tn "Reboot" /f
	
	IF "%var_is64%"=="1" (
		Schtasks /create /tn "Timer ON" /f /sd %var_startdate% /sc daily /st %var_ontimer% /tr "C:\LiveDigital\hstart64.exe /NOCONSOLE /ELEVATE ""C:\LiveDigital\timer-on.bat""" /rl HIGHEST
		Schtasks /create /tn "Timer OFF" /f /sd %var_startdate% /sc daily /st %var_offtimer% /tr "C:\LiveDigital\hstart64.exe /NOCONSOLE /ELEVATE ""C:\LiveDigital\timer-off.bat""" /rl HIGHEST
	
	) ELSE (
		Schtasks /create /tn "Timer ON" /f /sd %var_startdate% /sc daily /st %var_ontimer% /tr "C:\LiveDigital\hstart.exe /NOCONSOLE /ELEVATE ""C:\LiveDigital\timer-on.bat""" /rl HIGHEST
		Schtasks /create /tn "Timer OFF" /f /sd %var_startdate% /sc daily /st %var_offtimer% /tr "C:\LiveDigital\hstart.exe /NOCONSOLE /ELEVATE ""C:\LiveDigital\timer-off.bat""" /rl HIGHEST
	)
)

IF "%var_screensave%"=="0" (
	schtasks /delete /tn "Screensave" /f
)

IF "%var_is64%"=="1" (
	wget64.exe --timeout=5 --tries=2 --delete-after "%var_pingaddress%%var_pingscript%?clientid=%var_client%&serverip=%var_supportip%&type=boot"
) ELSE (
	wget.exe --timeout=5 --tries=2 --delete-after "%var_pingaddress%%var_pingscript%?clientid=%var_client%&serverip=%var_supportip%&type=boot"
)

PING 127.0.0.1 -n 4 -w 500

START /B C:\LiveDigital\datetime.bat

PING 127.0.0.1 -n 4 -w 500

START /B C:\LiveDigital\startplayer.bat

PING 127.0.0.1 -n 4 -w 500

START /B C:\LiveDigital\reconnect.bat

PING 127.0.0.1 -n 4 -w 500

START /B C:\LiveDigital\tools\hddspace\hdd-space.bat

PING 127.0.0.1 -n 4 -w 500

START /B C:\LiveDigital\tools\networking.bat

PING 127.0.0.1 -n 4 -w 500

START /B C:\LiveDigital\tools\create-browse-tasks.bat

PING 127.0.0.1 -n 4 -w 500

START /B C:\LiveDigital\tools\bsod-check.bat

PING 127.0.0.1 -n 8 -w 500

EXIT