@Echo off
if %1. == . goto help
if %1. == help. goto help
if %1. == HELP. goto help
if %1. == warp3. goto warp3
if %1. == WARP3. goto warp3
if %1. == warp4. goto warp4
if %1. == WARP4. goto warp4
if %1. == wseb. goto warp4
if %1. == WSEB. goto warp4
if %1. == convp. goto warp4
if %1. == CONVP. goto warp4
if %1. == basedd. goto basedd
if %1. == BASEDD. goto basedd
if %1. == network. goto network
if %1. == NETWORK. goto network
goto help

:network
if %2. == . goto network2
@Echo Starting FSERVICE ...
fservice /r:response.lan /b:%2
goto end

:network2
@Echo Starting FSERVICE ...
fservice /r:response.lan
goto end

:warp3
@Echo Starting FSERVICE ...
fservice /r:response.wp3
goto end

:warp4
@Echo Starting FSERVICE ...
fservice /r:response.wp4
goto end

:basedd
if %2. == . goto sourceA
if %2. == A:. goto sourceA
if %2. == a:. goto sourceA
if %2. == A:\. goto sourceA
if %2. == a:\. goto sourceA
REM Source is not the A drive
if not exist %2\FIX\FIXTOOL.EXT\FIXTPREP.EXE @Echo Invalid source drive entered, %2
if not exist %2\FIX\FIXTOOL.EXT\FIXTPREP.EXE @Echo Retry the command. "fpinst basedd <source drive>"
if exist %2\FIX\FIXTOOL.EXT\FIXTPREP.EXE %2\FIX\FIXTOOL.EXT\FIXTPREP
if exist %2\FIX\FIXTOOL.EXT\FIXTPREP.EXE @Echo Starting FSERVICE ...
if exist %2\FIX\FIXTOOL.EXT\FIXTPREP.EXE fservice /r:response.bdd
goto end

:sourceA
setlocal
set drive=A:
if exist %drive%\fix\fixtool.ext\fixtprep.exe %drive%\FIX\FIXTOOL.EXT\FIXTPREP
if exist %drive%\fix\fixtool.ext\fixtprep.exe goto StartBDD
endlocal
@Echo ** Perform the following:
@Echo 1. Press Ctrl + C to exit the FPINST.CMD
@Echo 2. Place Base Device Driver Diskette 1 into the A: drive,
@Echo 3. Run A:\fix\fixtool.ext\fixtprep.exe,
@Echo 4. Replace the FixTool diskette back into the A:
@Echo 5. Re-Run the command: fpinst basedd
@Echo 6. Press any key to continue.
@Echo ** Note: The above steps only need to be performed once.
@Pause
:StartBDD
@Echo Starting FSERVICE ...
fservice /r:response.bdd
goto end

:help
@Echo Usage: FPINST fixpak_type
@Echo        where  fixpak_type can be:
@Echo               WARP3       for applying a FixPak to OS/2 Warp Version 3.0.
@Echo               WARP4       for applying a FixPak to OS/2 Warp Version 4.0.
@Echo               WSEB        for applying a FixPak to OS/2 Warp Server for
@Echo                           e-business.
@Echo               CONVP       for applying a FixPak to OS/2 Warp Convenience
@Echo                           Packages.
@Echo               BASEDD src  for applying a Base Device Driver FixPak to OS/2
@Echo                           Warp Version 3.0, Warp Version 4.0, or Warp Server
@Echo                           for e-business, where src is an optional parameter
@Echo                           for the location of the Base Device Driver source.
@Echo                           A: is the default source location.
@Echo               NETWORK d   for applying LAN or other network-related FixPaks,
@Echo                           where d is an optional parameter for the OS/2
@Echo                           boot drive.  Use it when you have multiple OS/2
@Echo                           boot partitions.

:end
REM /**************************************************************************/
REM /*  Change History                                                        */
REM /*                                                                        */
REM /*  DEFECT   CHANGED BY     DESCRIPTION                          DATE     */
REM /*  244173   M. Gerlofs     Added support for BASEDD and WSEB    07/2000  */
REM /*  254969   I. Spalten     Added Support for Convenience Packs  03/29/01 */
REM /**************************************************************************/

