home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
High Voltage Shareware
/
high1.zip
/
high1
/
DIR24
/
PMP203.ZIP
/
INSTALL.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1993-12-21
|
3KB
|
107 lines
/*********************************************************************
PM Patrol installation
*********************************************************************/
trace 'O'
address CMD
'@ECHO OFF'
'cls'
say "PM Patrol Installation"
say "----------------------"
/*********************************************************************
Initialization
*********************************************************************/
call rxfuncadd sysloadfuncs, rexxutil, sysloadfuncs
call sysloadfuncs
instdrive = ''
instpath = ''
bootdrive = Substr(Translate(Value('PATH',,'OS2ENVIRONMENT')),Pos('\OS2\SYSTEM',Translate(Value('PATH',,'OS2ENVIRONMENT')))-2,2)
/*********************************************************************
Get the installation drive and path
*********************************************************************/
say ""
say "Please enter the drive to install upon: (ie. C:)"
parse Upper Pull instdrive
if instdrive == '' then do
instdrive=bootdrive
end
if right(instdrive, 1)<>':' then do
instdrive=instdrive||':'
end
say ""
say "PM Patrol creates a subdirectory called PMP for it's files."
say "Please enter the directory where PMP should be placed: (blank for root)"
parse Upper Pull intpath
if intpath <> '' then do
if left(intpath, 1) <> '\' then do
intpath='\'||intpath
end
end
intpath=instdrive||intpath
instpath=intpath||"\PMP"
say "PM Patrol will be installed in: " instpath
say "Is this correct? (Y/N)"
parse Upper Pull response
if response <> 'Y' then do
say "PM Patrol installation aborted. Nothing installed."
exit 1
end
'md ' intpath ' 1>nul 2>nul'
'md ' instpath ' 1>nul 2>nul'
say "Installing PM Patrol files..."
'copy * ' instpath ' 1>nul'
if rc <> 0 then do
say "Problem copying files to " instpath
exit 1
end
/*********************************************************************
Define and Create the Folder
*********************************************************************/
say "Creating WorkPlace objects..."
foldobj='<PMPatrol>'
foldtitle='PM Patrol'
foldicon='pmpfoldr.ico'
call SysCreateObject 'WPFolder', foldtitle,'<WP_DESKTOP>','OBJECTID='||foldobj||';ICONFILE='||instpath||'\'||foldicon||';','R'
/*********************************************************************
Create Reference Program ICONs in the Folder
*********************************************************************/
progobj='PMP_Info'
progname='view.exe'
progtitle='Information'
progpath=bootdrive||'\os2'
progtype='PM'
progparm='pmpatrol.inf'
call CreateProgram
progobj='PMP_Patrol'
progname='pmpatrol.exe'
progtitle='PM Patrol'
progpath=instpath
progtype='PM'
progparm=''
call CreateProgram
/*********************************************************************
let em know everything worked
*********************************************************************/
say "PM Patrol sucessfully installed."
exit 0
/*********************************************************************
create a program object in a folder
*********************************************************************/
CreateProgram:
call SysCreateObject 'WPProgram',progtitle,foldobj,'OBJECTID='||progobj||';EXENAME='||progpath||'\'||progname||';PROGTYPE='||progtype||';PARAMETERS='||progparm||';STARTUPDIR='||instpath||';','R'
return