@echo off
if not exist .\setup.cmd goto explain
if NOT %1. == . GOTO check
:explain
echo Usage:
echo *
echo *    Change to install drive and CD to install directory
echo *    Then say,
echo *
echo *            SETUP  bootdrive
echo *
echo *    Where "bootdrive" is your OS/2 boot drive.  Example:
echo *
echo *           SETUP C                 Installs to C:
echo *           SETUP D                 Installs to D:
echo *             etc.
goto end
:check
if %1. == A. goto baddrive
if %1. == B. goto baddrive
if %1. == c. goto okdrive
if %1. == d. goto okdrive
if %1. == C. goto okdrive
if %1. == D. goto okdrive
if %1. == E. goto okdrive
if %1. == F. goto okdrive
if %1. == G. goto okdrive
if %1. == H. goto okdrive
if %1. == I. goto okdrive
if %1. == J. goto okdrive
if %1. == K. goto okdrive
if %1. == L. goto okdrive
if %1. == M. goto okdrive
if %1. == N. goto okdrive
if %1. == O. goto okdrive
if %1. == P. goto okdrive
if %1. == Q. goto okdrive
if %1. == R. goto okdrive
if %1. == S. goto okdrive
if %1. == T. goto okdrive
if %1. == U. goto okdrive
if %1. == V. goto okdrive
if %1. == W. goto okdrive
if %1. == X. goto okdrive
if %1. == Y. goto okdrive
if %1. == Z. goto okdrive
if %1. == a. goto baddrive
if %1. == b. goto baddrive
if %1. == e. goto okdrive
if %1. == f. goto okdrive
if %1. == g. goto okdrive
if %1. == h. goto okdrive
if %1. == i. goto okdrive
if %1. == j. goto okdrive
if %1. == k. goto okdrive
if %1. == l. goto okdrive
if %1. == m. goto okdrive
if %1. == n. goto okdrive
if %1. == o. goto okdrive
if %1. == p. goto okdrive
if %1. == q. goto okdrive
if %1. == r. goto okdrive
if %1. == s. goto okdrive
if %1. == t. goto okdrive
if %1. == u. goto okdrive
if %1. == v. goto okdrive
if %1. == w. goto okdrive
if %1. == x. goto okdrive
if %1. == y. goto okdrive
if %1. == z. goto okdrive
goto explain
:okdrive
if not exist %1:\os2 goto baddrive

copy NEOMAGIC.dsc %1:\os2\install\NEOMAGIC.dsc > nul

attrib %1:\psfonts\*.pfb -r > nul
attrib %1:\psfonts\*.pfb +a > nul

%1:\os2\install\dspinstl

rem   12/19/96, robert fang
rem   Get the version level of the OS/2,
rem   If it is 4.0, delete the file c:\os2\mdos\VPRPMI.SYS
rem   If it is 3.0, append "DEVICE=%BOOTDRIVE%:\OS2\MDOS\VPRPMI.SYS"
rem                        to the end of CONFIG.SYS.
rem
rem   See NEOMAGIC.DSP for more information.
rem
rem   02/12/97, robert fang
rem   Add "set autostart" line at the end of config.sys
rem

testver > nul
if ERRORLEVEL 400 GOTO ver40
if ERRORLEVEL 300 GOTO ver30

:ver30
echo DEVICE=%1:\OS2\MDOS\VPRPMI.SYS >> %1:\config.sys
echo SET AUTOSTART=TASKLIST,FOLDERS,CONNECTIONS,LAUNCHPAD >> %1:\config.sys
goto exit

:ver40
erase %1:\os2\mdos\vprpmi.sys > nul
echo SET AUTOSTART=TASKLIST,FOLDERS,CONNECTIONS,LAUNCHPAD,WARPCENTER >> %1:\config.sys
goto exit

:exit
echo .
echo ***Installation Complete
echo .
echo .
echo .
goto end

:baddrive
echo
echo ERROR -- Cannot install to drive %1:
echo
echo !!!  Installation was unsuccessful
echo .
echo .
echo .
:end
