home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mega Top 1
/
os2_top1.zip
/
os2_top1
/
APPS
/
UTILS
/
P-Z
/
STAMPM10
/
INSTALL.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1994-03-12
|
2KB
|
69 lines
/* Stamp'em Install Program
If OS/2 REXX isn't installed, this won't work */
Call RxFuncAdd 'SysLoadFuncs', 'REXXUtil', 'sysLoadFuncs'
Call SysLoadFuncs
/* Prompt user for drive and directory to install to */
InputPath:
say "Specify directory to install Stamp'em in. Drive & path required"
say "(e.g. C:\OS2\STAMPEM ). Directory will be created if it doesn't"
say "already exist"
say "?"
parse pull dirname
/* Check to see if dirname exists */
doesdirexist = directory( dirname )
select
when doesdirexist = '' then do
rc = SysMkDir( dirname )
select
when rc = 0 then do
/* directory created ok */
end
when rc = 3 then do
say 'Invalid path. Try again'
signal InputPath
end
when rc = 87 then do
say 'Invalid parameter. Try again'
signal InputPath
end
otherwise do
say 'Error - directory not created. Try again'
signal InputPath
end
end
end
otherwise do
/* directory already exists, so proceed */
end
end
/* Copy files to the chosen directory */
Copy 'Stampem.* 'dirname
/* Create a Folder & Place it onto the Desktop */
IconName= dirname'\Stampem.ICO'
Call SysCreateObject 'WPFolder', ,
"Stamp'em^Folder", ,
'<WP_DESKTOP>', ,
'ICONVIEW=NOLINES;' || ,
"OBJECTID=<Stamp'em_Folder>;" || ,
'ICONFILE='IconName';' ,
'U'
ClassName='WPProgram'
Title="Stamp'em"
Location="<Stamp'em_Folder>"
progtype='PROGTYPE=PM;'
MaxWindow='MAXIMIZED=YES;'
CloseatEnd='NOAUTOCLOSE=YES;'
exeid='EXENAME='dirname'\stampem.exe;'
Object='OBJECTID=<Stampem_CMD>;'
icon='iconfile='dirname'\stampem.ico;'
Setup=object || exeid || progtype || MaxWindow ,
|| CloseAtEnd || icon
rc=SysCreateObject(ClassName, Title, ,
Location, Setup, 'F')