home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 8 Other
/
08-Other.zip
/
mshred.zip
/
install.cmd
< prev
next >
Wrap
OS/2 REXX Batch file
|
1996-01-10
|
2KB
|
70 lines
/*
* mshred installation program.
*
* Run as "INSTALL DEINSTALL" to deinstall mshred.
* Anything else installs mshred.
*
* Hector wuz here.
*/
'@cls'
say ''
say ' New WPS object "mshred," a shredder that deletes most anything.'
say ' Also has a "trashcan"-mode. Copy or link drop for a bonus.'
say ''
say ' Copyright (c) 1995/96 by M. Kimes -- all rights reserved.'
say ' But free-for-the-using. No warranty.'
say ''
parse upper arg dummy
Call RxFuncAdd 'SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs'
Call SysLoadFuncs
/* Get system DLL directory path */
system_dll=FileSpec('Drive',Value('SYSTEM_INI',,'OS2ENVIRONMENT'))||'\OS2\DLL'
/* deregister class */
call SysDeregisterObjectClass 'mshred'
/* delete object */
call SysDestroyObject '<MSHRED>'
/* Erase old DLL */
'@ERASE 'system_dll'\mshred.dll 2>NUL'
if dummy = 'DEINSTALL' then /* INSTALL DEINSTALL to deinstall mshred */
do
say "mshred is uninstalled."
Exit
end
say "Copying DLL system directory..."
/* Copy new DLL to system DLL dir */
'@COPY mshred.dll 'system_dll
say "Registering mshred class..."
/* Register mshred class */
rc = SysRegisterObjectClass('mshred',system_dll||'\MSHRED.DLL')
If rc <> 1 /* If mshred class did not register OK */
Then Do
Say "mshred: could not register mshred class, rc="rc"."
Exit
End
say "Creating mshred desktop object..."
/* Now create object on Desktop */
rc = SysCreateObject('mshred','The Mangler','<WP_DESKTOP>',,
'OBJECTID=<MSHRED>;','replace')
If rc <> 1 /* If there were create errors... */
Then Do
Say "mshred: couldn't create object on the Desktop, rc="rc"."
Exit
End
say ''
say " mshred installation is complete."
say ''
say " Run 'INSTALL DEINSTALL' to uninstall mshred if desired."