home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 8 Other
/
08-Other.zip
/
thcdasd.zip
/
LSRXINST.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1996-10-29
|
5KB
|
177 lines
/* OS/2 REXX */
/* (c) Steve Sharrad, 04/08/96 */
/* INSTALL routine for LSRXUT.DLL */
/* Version 1.00 */
/* The HENLEY College */
signal on error name no_rexx
call rxfuncadd 'SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs'
call sysloadfuncs
signal on error name unknown
'@echo off'
'cls'
say "Steve Sharrad's DASD Utilities"
say "REXX/LAN API install routine version 1.00"
say ' '
say 'The REXX API file, LSRXUT.DLL, is a productivity'
say 'aid supplied with Lan Server and is copyright IBM.'
say ' '
say 'BACKDASD and RESTDASD require this file to run'
say 'correctly. SETDASD does not require this file.'
say ' '
say 'You should be running this file off your harddisk.'
say ' '
say 'You must be running OS/2 2.1 or above.'
say 'You must be running IBM OS/2 Lan Server 4.0'
say 'or IBM Warp Server 4.0 or above.'
say ' '
say 'The LSRXUT.DLL will be copied into the NETLIB'
say 'directory.'
signal start
start:
say ' '
say 'Which drive does the IBMLAN tree reside on ?'
pull ibmlandrive
ibmlandrive=translate(ibmlandrive)
if length(ibmlandrive) \= '1' then do
say 'You must enter a single drive letter !'
signal start
end
ibmlanpath=ibmlandrive':\IBMLAN'
signal next1
next1:
s_path='a:\'
say ' '
say 'Is your copy of OS/2 Warp/Lan server on diskette'
say 'or CD-ROM ? '
say ' '
say 'Press:'
say '1 Diskette (Drive A) '
say '2 CD-ROM'
say ' '
pull s_type
if length(s_type) \= '1' then do
say 'You must enter either 1 or 2!'
signal next1
end
if s_type = '1' then signal floppy
signal getletter
getletter:
say ' '
say 'What drive letter is your CD-ROM of Lan Server? '
pull s_letter
if length(s_letter) \= '1' then do
say 'You must enter a single drive letter !'
signal next1
end
s_path=s_letter':\'
signal cdrom
cdrom:
file=s_path'pkunzip2.exe'
say 'Scanning disk...'
call sysfiletree file,'tree','FSO'
if tree.0 = 0 then do
say 'PKUNZIP2.EXE not found. Try again.'
signal getletter
end
say 'Copying unpacker...'
cline='copy 'tree.1' 'ibmlanpath'\pkunzip2.exe >nul'
cline
file=s_path'lsrxut.dll'
say 'Scanning disk...'
call sysfiletree file,'tree','FSO'
if tree.0 \= 0 then do
say 'Copying uncompressed file...'
cline='copy 'tree.1' 'ibmlanpath'\netlib\lsrxut.dll >nul'
cline
end
else do
file=s_path'lsrxutil.zip'
call sysfiletree file,'tree','FSO'
if tree.0 \= 0 then do
say 'Uncompressing file...'
cline=ibmlanpath'\pkunzip2 -o 'tree.1' 'ibmlanpath'\lsrxutil.zip >nul'
cline
say 'Copying file...'
if filefind(ibmlanpath'\lsrxut.40') then cline='copy 'ibmlanpath'\lsrxut.40 'ibmlanpath'\lsrxut.dll >nul'
if filefind(ibmlanpath'\lsrxut.dll') then cline='copy 'ibmlanpath'\lsrxut.dll 'ibmlanpath'\lsrxut.dll >nul'
cline
end
else signal getletter
end
say ' '
say 'Completed.'
signal end
floppy:
say ' '
say 'Insert the Productivity Aids disk 1 or the disk'
say 'containing PKUNZIP2.EXE into the drive.'
'pause'
file=s_path'pkunzip2.exe'
if filefind(file) then do
say 'Copying unpacker...'
cline='copy 'file' 'ibmlanpath'\pkunzip2.exe >nul'
cline
end
else signal floppy
signal floppy2
floppy2:
say ' '
say 'Insert the Productivity Aids disk 2 or the disk'
say 'containing LSRXUTIL.ZIP or LSRXUT.DLL into the'
say 'drive.'
'pause'
if filefind(s_path'lsrxut.dll') then do
say 'Copying uncompressed file...'
cline='copy 's_path'lsrxut.dll 'ibmlanpath'\netlib\lsrxut.dll >nul'
cline
end
else do
if filefind(s_path'lsrxutil.zip') then do
say 'Uncompressing file...'
cline=ibmlanpath'\pkunzip2 -o 's_path'lsrxutil.zip 'ibmlanpath
cline
say 'Copying file...'
if filefind(ibmlanpath'\lsrxut.40') then cline='copy 'ibmlanpath'\lsrxut.40 'ibmlanpath'\lsrxut.dll >nul'
if filefind(ibmlanpath'\lsrxut.dll') then cline='copy 'ibmlanpath'\lsrxut.dll 'ibmlanpath'\lsrxut.dll >nul'
cline
end
else signal floppy2
end
say ' '
say 'Completed.'
signal end
filefind: Procedure
return ('' \= stream( arg(1), 'c', 'query exists') )
signal end
unknown:
say 'An unkown error has occurred. Try install again. Check all'
say 'locations that you have given are correct. If the problem'
say 'still occurs, then you may copy the files manually.'
signal end
no_rexx:
say 'Could not initialise REXX libraries. Check that you have all OS/2'
say "files installed. These utilities won't work on old versions of OS/2"
say 'which do not have the Extended Sevices built in.'
signal end
abort:
say 'Install aborted by user.'
signal end
end: