@ECHO OFF

echo Enter GridVista Module >> c:\windows\patch.log

SET @WPanel=F

INT15_DETECT.EXE /ST:GETPANEL
IF ERRORLEVEL 12010 GOTO 159
IF ERRORLEVEL 12009 GOTO SXGA
IF ERRORLEVEL 12008 GOTO WUXGA
IF ERRORLEVEL 12007 GOTO WSXGAPLUS
IF ERRORLEVEL 12006 GOTO WSXGA
IF ERRORLEVEL 12005 GOTO WXGA
IF ERRORLEVEL 12004 GOTO 1600
IF ERRORLEVEL 12003 GOTO 1400
IF ERRORLEVEL 12002 GOTO 1024
IF ERRORLEVEL 12001 GOTO 800
IF ERRORLEVEL 12000 GOTO GV_CHK
GOTO GV_CHK


:159
ECHO 15:9 PANEL, SET 1280X768 >>%@DST%\WINDOWS\PATCH.LOG
SET @WPanel=T
GOTO GV_CHK

:SXGA
ECHO SXGA PANEL, SET 1280X1024 >>%@DST%\WINDOWS\PATCH.LOG
GOTO GV_CHK

:WUXGA
ECHO WUXGA PANEL, SET 1920X1200 >>%@DST%\WINDOWS\PATCH.LOG
SET @WPanel=T
GOTO GV_CHK

:WSXGAPLUS
ECHO WSXGAPLUS PANEL, SET 1680X1050 >>%@DST%\WINDOWS\PATCH.LOG
SET @WPanel=T
GOTO GV_CHK

:WSXGA
ECHO WSXGA PANEL, SET 1440X900 >>%@DST%\WINDOWS\PATCH.LOG
SET @WPanel=T
GOTO GV_CHK

:WXGA
ECHO WXGA PANEL, SET 1280X800 T659 >>%@DST%\WINDOWS\PATCH.LOG
SET @WPanel=T
GOTO GV_CHK

:1600
ECHO SET 1600X1200 >>%@DST%\WINDOWS\PATCH.LOG
GOTO GV_CHK

:1400
ECHO SET 1400X1050 >>%@DST%\WINDOWS\PATCH.LOG
GOTO GV_CHK

:1024
ECHO SET 1024X768 >>%@DST%\WINDOWS\PATCH.LOG
GOTO GV_CHK

:800
ECHO SET 800X600 >>%@DST%\WINDOWS\PATCH.LOG
GOTO GV_CHK

:GV_CHK

if "%@WPanel%"=="T" goto insGV
goto GV_END

:insGV
echo Start to install GradVista >> c:\windows\patch.log
start /w Setup.exe /s /noreboot

:GV_END
