home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 8 Other
/
08-Other.zip
/
pktdem.zip
/
INSTALL.CMD
next >
Wrap
OS/2 REXX Batch file
|
1993-07-09
|
2KB
|
77 lines
/* PocketMail Installation */
/* install expects to find a pathname specified as a command tail */
arg filename
if filename = '' then do
say
Say "You must enter a valid directory name in order to install PocketMail."
Say "The directory name should take the form c:\directory where"
Say "c: is any valid hard drive and \directory is the directory "
Say "on that drive into which PocketMail is to be installed. "
Say "If the directory does not exist, it is created for you."
say
exit
end
requestDrive = substr(filename,1,2)
requestPath = substr(filename,3)
call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
call SysLoadFuncs
/* edit to verify that drive requested is a valid local drive */
map = SysDriveMap(,LOCAL)
nbrDrives = words(map)
driveIndex = 1
do while driveIndex <= nbrDrives
if word(map,driveIndex) = requestDrive then leave
driveIndex = driveIndex + 1
end
if driveIndex > nbrDrives then do
say
say "The drive you requested ("||requestDrive||") is not a valid local drive."
say "Your valid local drives are:" map
say
exit
end
/* verify there is enough space to install PocketMail */
info = SysDriveInfo(requestDrive)
parse value info with . availableSpace .
remainingAfter = availableSpace - 2100000
if remainingAfter < 0 then do
say
say "You need at least 2.1 MB of available disk space to install PocketMail."
say "Drive" drive "has" availableSpace "bytes available."
say "You need to make at least" abs(remainingAfter) "bytes available."
say
exit
end
"pkunzip2 -dx pktdemo "||filename
"md "||filename||"\REC"
"md "||filename||"\MES"
"md "||filename||"\LOG"
setupString = "OBJECTID=<UWPSP_PKTDEMO>;EXENAME="||filename||"\PKTDEMO.EXE;STARTUPDIR="||filename
rc = SysCreateObject("WPProgram",,
"PocketMail(TM) for OS/2^1.0 Demo version",,
"<WP_DESKTOP>",,
setupString,,
"FailIfExists")
if rc = 0 then
say "The PocketMail program object already exists on the desktop"
"exit"