@if not exist echo.on ECHO OFF
IF .%1. == .. GOTO USAGE
IF .%2. == .. GOTO USAGE
IF NOT EXIST %2\OS2\INSTALL GOTO USAGE
set rsp=%2\os2\install\response.fil
set log=%2\os2\install\display.log
%1\PRODSYNC.EXE %1 %2 %log%
IF ERRORLEVEL 1 GOTO END
ECHO *:LOGFILE %log% >%rsp%
ECHO :FLAGS REPLACE_PROTECTED >>%rsp%
ECHO :SOURCE %1 >>%rsp%
ECHO :SERVICE >>%rsp%
ECHO :SYSLEVEL %2\OS2\INSTALL\SYSLEVEL.OS2 >>%rsp%
ECHO :ARCHIVE %2\ARCHIVE >>%rsp%
%1\unpack2 %1\fservice.ex_ %2\os2\install 1>NUL 
IF NOT EXIST %2\os2\install\fservice.exe goto ERR
%1\unpack2 %1\csfpans.dl_ %2\os2\dll 1>NUL 
IF NOT EXIST %2\os2\dll\csfpans.dll goto ERR
IF EXIST %1\ibmvesa if not exist %2\ibmvesa MD %2\ibmvesa
IF EXIST %1\ibmvesa replace %1\ibmvesa\*.* %2\ibmvesa /a >>%log%
IF EXIST %1\ibmvesa replace %1\ibmvesa\*.* %2\ibmvesa /u >>%log%
IF NOT EXIST %1\testver.ex_ goto fix
%1\unpack2 %1\testver.ex_ %2\os2\install 1>NUL
IF NOT EXIST %2\os2\install\testver.exe goto ERR
%2\os2\install\testver
IF ERRORLEVEL 1 GOTO B4V3
:V3
goto UNSUPP
:B4V3
%1\unpack2 %1\videocfg.20_ %2\os2\dll 1>NUL
if ERRORLEVEL 2 goto vga
if not exist %2\os2\dll\wpvidsys.dll %1\unpack2 %1\wpvidsys.dl_ %2\os2\dll 1>NUL
%1\unpack2 %1\vcfginst.ex_ %2\os2 1>NUL
%2\os2\vcfginst
:FIX
%2\os2\install\FSERVICE /s:%1 /t:%2\ /r:%rsp% /l:%log%
GOTO END
:VGA
@echo Ensure system has been reset to VGA, Re-run setup
GOTO END
:ERR
@echo Could not unpack a critical file
GOTO END
:UNSUPP
@echo This package is not intended for OS/2 v3
@echo This package is not intended for OS/2 v3 >> %log%
GOTO END
:USAGE
ECHO ÿ
ECHO Usage: SETUP [INSTALLDRIVE:] [BOOTDRIVE:]
:END
