home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 8 Other
/
08-Other.zip
/
trashcan.zip
/
install.cmd
< prev
next >
Wrap
OS/2 REXX Batch file
|
1995-08-26
|
1KB
|
59 lines
/*
* Install WPTrashCan class, Trashcan object
* (c) Henicke, Andreas 1995 Rostock
*/
parse arg arglist .
call rxfuncadd 'sysloadfuncs','rexxutil','sysloadfuncs'
call sysloadfuncs
parse value sysos2ver() with major'.'minor
veros2=major*100+left(minor,2,0)
/* test os/2 version (os/2 warp3: 2.30) */
if veros2<230 then do
say 'need OS version 2.30 and above'
exit
end
/* PrÜfe vorhandene Dateien */
call sysfiletree '.\trashcan.dll', ll0, 'FO'
if ll0.0=0 then do
say 'error: miss .\trashcan.dll'
exit
end
/* get [d:]\os2\dll directory */
template='\os2\dll'
path=''
ds=sysdrivemap(c, local)
do di=1 to ((length(ds)+1)/3)-1
dd=word(ds, di);
call sysfiletree dd || template, dl, 'DO'
if dl.0<>0 then do
path=translate(dl.1)
leave
end
end
if path=='' then do
say 'error: miss ' template
exit
end
dllpath=path || '\trashcan.dll'
call sysfiletree dllpath, tl, 'FO'
if tl.0<>0 then do
say 'error: found' dllpath
exit
end
/* copy trashcan.dll in [d:]\os2\dll */
address cmd '@copy trashcan.dll' dllpath '> NUL'
/* register class WPTrashCan and create object <TRASHCAN> */
call sysregisterobjectclass 'WPTrashCan', dllpath
call syscreateobject 'WPTrashCan','Trashcan','<WP_DESKTOP>','OBJECTID=<TRASHCAN>'
exit