echo off
cls
if  "%1"=="" goto TRYAGAIN
if  "%2"=="" goto TRYAGAIN
if  "%1"=="a:" goto DRIVE1OK
if  "%1"=="A:" goto DRIVE1OK
if  "%1"=="b:" goto DRIVE1OK
if  "%1"=="B:" goto DRIVE1OK
goto TRYAGAIN

:DRIVE1OK
if  "%2"=="C" goto TRYAGAIN
if  "%2"=="c" goto TRYAGAIN
echo.
echo.
echo                                ************
echo.
echo                          WordPerfect Presents
echo                     WordPerfect 5.2 for OS/2 Demo
echo.
echo                                INSTALLATION
echo.
echo.    
echo                This program requires 585 KB of RAM and
echo                3.6 MB of free disk space on your hard drive.
echo.
echo                It takes from 2 to 10 minutes to automatically
echo                install, depending on the speed of your system.
echo.
echo                It will make a directory called %2\wp52demo
echo.      
echo                If you wish to quit at this time, then
echo                please press [Ctrl] [C].
echo.
pause

%1free %2 3600000
if errorlevel 1 goto NOTFREE
%1free %2 5100000
if errorlevel 1 goto FROMA

md %2\wp52demo >nul
echo.
echo                Now installing the demo.  Please wait...
if "%2"=="c:" copy %1\wp-democ.bat %2\wp52demo\wp-demo.bat > nul
if "%2"=="C:" copy %1\wp-democ.bat %2\wp52demo\wp-demo.bat > nul
if "%2"=="d:" copy %1\wp-demod.bat %2\wp52demo\wp-demo.bat > nul
if "%2"=="D:" copy %1\wp-demod.bat %2\wp52demo\wp-demo.bat > nul
if "%2"=="e:" copy %1\wp-demoe.bat %2\wp52demo\wp-demo.bat > nul
if "%2"=="E:" copy %1\wp-demoe.bat %2\wp52demo\wp-demo.bat > nul
copy %1wpos2a.exe %2\wp52demo >nul
%2\wp52demo\wpos2a.exe -e -y %2\wp52demo\ >nul
%2 >nul
cd %2\wp52demo >nul
del %2\wp52demo\wpos2a.exe >nul
goto UPDESKTOP
 
:FROMA
md %2\wp52demo >nul
echo.
echo                Now installing the demo.  Please wait...
if "%2"=="c:" copy %1\wp-democ.bat %2\wp52demo\wp-demo.bat > nul
if "%2"=="C:" copy %1\wp-democ.bat %2\wp52demo\wp-demo.bat > nul
if "%2"=="d:" copy %1\wp-demod.bat %2\wp52demo\wp-demo.bat > nul
if "%2"=="D:" copy %1\wp-demod.bat %2\wp52demo\wp-demo.bat > nul
if "%2"=="e:" copy %1\wp-demoe.bat %2\wp52demo\wp-demo.bat > nul
if "%2"=="E:" copy %1\wp-demoe.bat %2\wp52demo\wp-demo.bat > nul
%1wpos2a.exe -e -y %2\wp52demo\ >nul
%2 >nul
cd %2\wp52demo >nul

:UPDESKTOP
copy %2\wp52demo\wp-demo.bat c:\desktop\wp-demo.bat >nul
if exist c:\desktop\wp-demo.bat goto GOODBYE
copy %2\wp52demo\wp-demo.bat c:\os!2_2.0_d\wp-demo.bat >nul
if exist c:\os!2_2.0_d\wp-demo.bat goto GOODBYE
copy %2\wp52demo\wp-demo.bat d:\desktop\wp-demo.bat >nul
if exist d:\desktop\wp-demo.bat goto GOODBYE
copy %2\wp52demo\wp-demo.bat d:\os!2_2.0_d\wp-demo.bat >nul
if exist d:\os!2_2.0_d\wp-demo.bat goto GOODBYE
copy %2\wp52demo\wp-demo.bat e:\desktop\wp-demo.bat >nul
if exist e:\desktop\wp-demo.bat goto GOODBYE
copy %2\wp52demo\wp-demo.bat e:\os!2_2.0_d\wp-demo.bat >nul
if exist e:\os!2_2.0_d\wp-demo.bat goto GOODBYE
echo Your desktop has not been updated
pause
goto goodbye

:TRYAGAIN
cls
echo.
echo.
echo.
echo                             *******************
echo.
echo     You can install this demo disk from DOS or OS/2:
echo.
echo     For DOS installation you must specify a source and destination drive:
echo              [source drive:]INSTALL [source drive:] [destination drive:]
echo              For example: A:INSTALL A: X:
echo.
echo.
echo     For OS/2 installation you must specify only a source and destination drive:
echo              [source drive:] [destination drive:]
echo              For example: A: C:
echo.
echo.
pause
goto EXIT

:NOTFREE
cls
echo                               *******************
echo            Your hard disk [%2] doesn't contain enough free space to 
echo            install the WordPerfect Demo.  You need at least 3.6 megabytes
echo            of free space to install the demo.
echo.
echo            Please remove some unnecessary files and try again!
echo.
pause
goto EXIT

:GOODBYE
cls 
echo.
echo.
echo                               *************
echo.
echo         To run the demo on DOS do the following:
echo            Go to %2\WP52DEMO directory and type WP-DEMO
echo.
echo         To run the demo on OS/2 do the following:
echo            Go to %2\WP52DEMO directory and type WP-DEMO
echo                                        - OR -
echo            Double-click on the WP-DEMO.BAT icon on the OS/2 desktop
echo.
echo.
echo         To run the demo now, press any key.
echo         To exit, press [Ctrl] [C].
echo.
pause 
%2\wp52demo\wp-demo.bat

:EXIT
