echo off
SET IMD=%1
if "%1" == "" goto Cinst
goto NotCinst
:CINST
SET IMD=C:\DOS
:NotCinst
IF NOT EXIST %IMD%\NUL GOTO HELP2
IF NOT EXIST RUNMAYBE.EXE GOTO HELP
IF NOT EXIST IM.EXE GOTO HELP
IF NOT EXIST IM.PRM GOTO HELP
COPY RUNMAYBE.EXE %IMD%
COPY IM.EXE %IMD%
COPY IM.PRM %IMD%
GOTO DONE
:HELP
ECHO ÿÿ
ECHO There is a missing file. Please check that these files are in the
ECHO current directory:
ECHO ÿÿ
ECHO          IM.EXE
ECHO          IM.PRM
ECHO    RUNMAYBE.EXE
GOTO EXIT
:HELP2
ECHO ÿÿ
ECHO %IMD% does not exist on your PC.  Please type the command:
ECHO ÿÿ
ECHO          IMCOPY  D:\DIR
ECHO ÿÿ
ECHO ÿwhere "D:" is the disk and "\DIR" is a directory on your DOS path.
ECHO  (Type "PATH"ÿ to see the directories on your DOS PATH)
ECHO ÿÿ
GOTO EXIT
:DONE
ECHO ÿIM.EXE, IM.PRM and RunMaybe.EXE have been copied to %IMD%.
ECHO  If %IMD% is on your DOS path you will be able to use these programs
ECHO  from anywhere on your disk.
ECHO ÿÿ
:EXIT
