@echo off

FOR /F "tokens=1-3 delims=/ " %%a IN ("%date%") DO (SET CurrentDate=%%c-%%a-%%b)
FOR /F "tokens=1-3 delims=:." %%a IN ("%time: =0%") DO (SET CurrentTime=%%a-%%b-%%c)
set Datetime=%CurrentDate%_%CurrentTime%

set LogDir=%ProgramData%\ASUS\TX Mascot\Log\Installer
if not exist "%LogDir%" mkdir "%LogDir%"
forfiles /p "%LogDir%" /s /m *.* /D -90 /C "cmd /c del @path" 2>nul
set Logger="%LogDir%\Insall_%Datetime%.log"

set Installer="%~dp0%TX Mascot Installer.msi"

msiexec /i %Installer% /L*I %Logger% /quiet /norestart CUSTOMARG="HideShortCut"

if "%1"=="/launch" (
	explorer "%ProgramFiles%\ASUS\TX Mascot\TX Mascot.exe"
)

exit /b 0