CALL C:\LiveDigital\config.bat

CD C:\LiveDigital

@echo off
@SETLOCAL enableextensions enabledelayedexpansion
for /f "usebackq skip=1 tokens=*" %%i in (`wmic bios get smbiosbiosversion`) do (
	set var_bios=%%i
	goto next
)

:next

IF "%var_is64%"=="1" (
	wget64.exe --no-check-certificate --delete-after "%var_pingaddress%%var_pingscript%?type=bios&clientid=%var_client%&serverip=%var_supportip%&value=%var_bios: =%"
) ELSE (
	wget.exe --no-check-certificate --delete-after "%var_pingaddress%%var_pingscript%?type=bios&clientid=%var_client%&serverip=%var_supportip%&value=%var_bios: =%"
)

@ECHO Bios Version: %var_bios%

IF EXIST C:\Windows\Minidump (

	FOR /f "delims=" %%f in ('dir C:\Windows\Minidump\*.dmp /b /a-d-h-s') do (
		echo %%f

		ncftpput.exe -DD -m -u %var_error_username% -p %var_error_password% %var_error_server% "/client_%var_client%/%var_hostname%" "C:\Windows\Minidump\%%f"

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

IF "%var_is64%"=="1" (
	wget64.exe --delete-after "%var_pingaddress%%var_pingscript%?clientid=%var_client%&serverip=%var_supportip%&type=version&version=%var_version%"
) ELSE (
	wget.exe --delete-after "%var_pingaddress%%var_pingscript%?clientid=%var_client%&serverip=%var_supportip%&type=version&version=%var_version%"
)

EXIT