home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / trshsqrt.zip / uninst.cmd < prev   
OS/2 REXX Batch file  |  1995-11-19  |  647b  |  31 lines

  1. /*
  2.  * Uninstall WPTrashcan
  3.  * (c) Henicke, Andreas 1995 Rostock
  4.  */
  5.  
  6. objectid    ='<TRASHCAN>'
  7. classid     ='WPTrashCan'
  8.  
  9. parse arg arglist .
  10. call rxfuncadd 'sysloadfuncs','rexxutil','sysloadfuncs'
  11. call sysloadfuncs
  12.  
  13. /* search WPTrashCan library */
  14. dllpath=''
  15. call sysqueryclasslist list.
  16. do i=1 to list.0
  17.    parse value list.i with class file
  18.    if class=classid then dllpath=file
  19. end
  20. if dllpath='' then exit
  21.  
  22. /* destroy object <TRASHCAN> and unregister class WPTrashCan */
  23. call sysdestroyobject objectid
  24. call sysderegisterobjectclass 'WPTrashCan'
  25.  
  26. /* remove WPTrashCan library */
  27. call sysfiledelete dllpath
  28.  
  29. exit
  30.  
  31.