home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / ds_skins.zip / UnInstal.cmd < prev    next >
OS/2 REXX Batch file  |  1999-10-21  |  2KB  |  64 lines

  1. /* Remove Data Shield                                    */
  2. /* Run this script from an OS/2 command line session     */
  3. /*                                                       */
  4. /* DO NOT USE THIS SCRIPT if you have installed this     */
  5. /* program into a directory that contains any other      */
  6. /* applications.                                         */
  7. /*                                                       */
  8. /* This script will delete EVERYTHING in the programs    */
  9. /* Install directory and attempt to remove the directory */
  10. /* also. It will also attempt to delete subdirectories   */
  11. /* and files that may have been created under this one.  */
  12. /*                                                       */
  13. /*    BE SURE YOU WANT TO DO THIS BEFORE PROCEEDING!     */
  14. /*                                                       */
  15.  
  16. crlf = '0d0a'x
  17. LinesToDo = 21
  18.  
  19. if left(SourceLine(15),7) <> '/* ALSO' then LinesToDo = 14
  20.  
  21. do index = 1 to LinesToDo
  22.   say SourceLine(index)
  23. end
  24.  
  25. say crlf||'Press [Y] to remove' strip(substr(SourceLine(1),11,47),'T') 'from your system'||crlf
  26. say '[Enter] to quit'
  27. pull approval
  28.  
  29. if approval <> 'Y' then exit
  30.  
  31. say crlf||'Removing all files...'
  32.  
  33. if RxFuncQuery('SysLoadFuncs') then do
  34.    call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  35.    call SysLoadFuncs
  36. end
  37.  
  38. /* Program files */
  39. Call sysfiletree 'H:\Prog\Psoft\Util\DShield\*.*','List','S','****','----'
  40. rc = sysfiletree('H:\Prog\Psoft\Util\DShield\','List','FSO')
  41. if List.0 > 0 then do
  42.   do index = 1 to List.0
  43.     rc = SysFileDelete(List.index)
  44.     say 'Deleting '||List.index
  45.   end
  46. end
  47.  
  48. /* Directories   */
  49. rc = sysfiletree('H:\Prog\Psoft\Util\DShield\','List','DSO')
  50. if List.0 > 0 then do
  51.   do index = List.0 to 1 by -1
  52.     rc = SysRmDir(List.index)
  53.     say 'Removing '||List.index
  54.   end
  55. end
  56.  
  57. /* Other work    */
  58. call SysDestroyObject '<DATASHIELD>'
  59.  
  60. cd ..
  61. say 'Removing Data Shield directory'
  62. rc = SysRmDir('H:\Prog\Psoft\Util\DShield')
  63. say crlf||'Done!'||crlf
  64.