echo off
setlocal ENABLEDELAYEDEXPANSION
if exist "C:\Program Files\ESET\ESET Security\ekrn.exe" (GOTO IS_INSTALLED) else (GOTO INSTALL)
GOTO INSTALL
:IS_INSTALLED
echo is installed
eventcreate /L APPLICATION /T INFORMATION /SO %~n0%~x0 /ID 208 /D "%~0 -- eset is already installed"
GOTO DONE
:INSTALL
echo installing software
eventcreate /L APPLICATION /T INFORMATION /SO %~n0%~x0 /ID 404 /D "%~0 -- eset is not installed -- installing now…"
if not exist C:\TEMP mkdir C:\TEMP
if not exist C:\TEMP\ESET mkdir C:\TEMP\ESET
if not exist C:\TEMP\ESET\eset.exe (curl -C - -o C:\TEMP\ESET\eset.exe https://example.com/eset/eset.exe)
C:\TEMP\ESET\eset.exe --silent --accepteula
GOTO DONE
:DONE
exit