echo off 
rem Installation Batch File for KPG3D Product Support Software 
rem Version 2.0  24/11/89  
if %1x == x goto drverr 
rem 
if %1 == a: goto drvok 
if %1 == A: goto drvok 
if %1 == b: goto drvok 
if %1 == B: goto drvok 
if %1 == c: goto drvok 
if %1 == C: goto drvok 
if %1 == d: goto drvok 
if %1 == D: goto drvok 
if %1 == e: goto drvok 
if %1 == E: goto drvok 
rem 
:drverr 
echo Invalid drive specification. 
goto crash 
rem 
:drvok 
echo Installing KPG3D Product Support Software on Drive %1 ... 
echo . 
rem 
copy %0.BAT %1\ 
if exist %1\%0.BAT goto driveok 
echo Drive not present or problem with diskette. 
del %1\%0.BAT 
goto crash 
rem 
:driveok 
del %1\%0.BAT
cd %1\ 
echo Creating directory \KENWOOD on %1 ... 
md %1\KENWOOD 
rem 
:proddir 
echo Creating directory \KENWOOD\KPG3D on %1 ... 
md %1\KENWOOD\KPG3D 
rem 
:helpdir 
echo Creating directory \KENWOOD\KPG3D\HELP on %1 ... 
md %1\KENWOOD\KPG3D\HELP 
rem 
:hbdir 
echo Creating directory \KENWOOD\KPG3D\HANDBOOK on %1 ... 
md %1\KENWOOD\KPG3D\HANDBOOK 
rem 
:setdir 
echo Creating directory \KENWOOD\KPG3D\SETUP on %1 ... 
md %1\KENWOOD\KPG3D\SETUP 
rem 
:copyhelp 
echo Copying HELP files ... 
if not exist .\HELP\KPG3D.F1 goto nohelp 
if not exist .\HELP\KPG3D.F2 goto nohelp 
if not exist .\HELP\KPG3D.F3 goto nohelp 
if not exist .\HELP\KPG3D.F4 goto nohelp 
if not exist .\HELP\KPG3D.F5 goto nohelp 
if not exist .\HELP\KPG3D.F6 goto nohelp 
if not exist .\HELP\KPG3D.F7 goto nohelp 
if not exist .\HELP\KPG3D.F8 goto nohelp 
if not exist .\HELP\KPG3D.PP goto nohelp 
if not exist .\HELP\KPG3D.SU goto nohelp 
copy .\HELP\KPG3D.F? %1\KENWOOD\KPG3D\HELP/v 
copy .\HELP\KPG3D.PP %1\KENWOOD\KPG3D\HELP/v 
copy .\HELP\KPG3D.SU %1\KENWOOD\KPG3D\HELP/v 
if not exist %1\KENWOOD\KPG3D\HELP\KPG3D.F1 goto hlpflt 
if not exist %1\KENWOOD\KPG3D\HELP\KPG3D.F2 goto hlpflt 
if not exist %1\KENWOOD\KPG3D\HELP\KPG3D.F3 goto hlpflt 
if not exist %1\KENWOOD\KPG3D\HELP\KPG3D.F4 goto hlpflt 
if not exist %1\KENWOOD\KPG3D\HELP\KPG3D.F5 goto hlpflt 
if not exist %1\KENWOOD\KPG3D\HELP\KPG3D.F6 goto hlpflt 
if not exist %1\KENWOOD\KPG3D\HELP\KPG3D.F7 goto hlpflt 
if not exist %1\KENWOOD\KPG3D\HELP\KPG3D.F8 goto hlpflt 
if not exist %1\KENWOOD\KPG3D\HELP\KPG3D.PP goto hlpflt 
if not exist %1\KENWOOD\KPG3D\HELP\KPG3D.SU goto hlpflt 
goto copyhb 
:hlpflt 
echo Error copying HELP files. 
goto crash 
:nohelp 
echo Not all HELP files present. 
goto crash 
rem 
:copyhb 
echo Copying HANDBOOK file ... 
if not exist .\HANDBOOK\KPG3D.HB goto nohb 
copy .\HANDBOOK\KPG3D.HB %1\KENWOOD\KPG3D\HANDBOOK/v 
if exist %1\KENWOOD\KPG3D\HANDBOOK\KPG3D.HB goto copyset 
echo Error copying HANDBOOK file 
goto crash 
:nohb 
echo HANDBOOK file not present. 
goto crash 
rem 
:copyset 
echo Copying Default SETUP file ... 
if not exist .\SETUP\KPG3D.DEF goto noset 
copy .\SETUP\KPG3D.DEF %1\KENWOOD\KPG3D\SETUP/v 
if exist %1\KENWOOD\KPG3D\SETUP\KPG3D.DEF goto copyins 
echo Error copying SETUP files 
goto crash 
:noset 
echo Default SETUP file not present. 
goto crash 
rem 
:copyins 
echo Copying Installation .BAT file ... 
if not exist .\KPG3DINS.BAT goto noins 
copy .\KPG3DINS.BAT %1\KENWOOD\KPG3D/v 
if exist %1\KENWOOD\KPG3D\KPG3DINS.BAT goto copybat 
echo Error copying Installation file. 
goto crash 
:noins 
echo Installation .BAT file not present. 
goto crash 
rem 
:copybat 
echo Copying Main .BAT file ... 
if not exist \KPG3D.BAT goto nobat 
copy \KPG3D.BAT %1\/v 
if exist %1\KPG3D.BAT goto copyexe
echo Error copying .BAT file 
goto crash 
:nobat 
echo Main .BAT file not present. 
goto crash 
rem 
:copyexe 
echo Copying Main .EXE file ... 
if not exist .\KPG3D.EXE goto noexe 
copy .\KPG3D.EXE %1\KENWOOD\KPG3D/v 
if exist %1\KENWOOD\KPG3D\KPG3D.EXE goto instalok
echo Error copying .EXE file. 
goto crash 
:noexe 
echo Main .EXE file not present. 
goto crash 
rem 
:instalok 
echo . 
echo Installation Successfully Completed. 
echo . 
goto exit 
rem 
:crash 
echo . 
echo Unable to Complete Installation. 
echo . 
:exit 
