home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 3 Comm / 03-Comm.zip / lw30.zip / DONTRUN.CMD < prev    next >
OS/2 REXX Batch file  |  1995-09-18  |  1KB  |  48 lines

  1. /* LiveWire/WPS DE-installation script */
  2. /* TO BE USED ONLY IN CONJUNCTION WITH */
  3. /* THE DEINST.EXE PROGRAM !!!          */
  4.  
  5. /* Install REXX system functions */
  6. call rxfuncadd sysloadfuncs, rexxutil, sysloadfuncs
  7. call sysloadfuncs
  8.  
  9. /* Determine the path to LiveWire */
  10. DeInstallPath = ARG(1)
  11. if (DeInstallPath = "") then Exit
  12. DeInstallSpec = DeInstallPath||"\*"
  13.  
  14. /* Begin installation */
  15. ECHO OFF
  16. call SysCls
  17. Say ""
  18. Say "LiveWire/WPS DeInstall Script"
  19. Say ""
  20. Say "Deleting the following folders:"
  21.  
  22. /* Get the directory tree */
  23. call SysFileTree DeInstallSpec, 'DirTree', 'DS'
  24.  
  25. /* Erase contents of the directories */
  26. do i=1 to DirTree.0
  27.    DirTree.i = SUBSTR(DirTree.i, 38)
  28.    Say DirTree.i
  29.    "erase" DirTree.i "/N"
  30. end
  31.  
  32. /* Remove the directories */
  33. do i=DirTree.0 to 1 by -1
  34.    "rmdir" DirTree.i
  35. end
  36.  
  37. /* Remove the main directory */
  38. "erase" DeInstallPath "/N"
  39. "rmdir" DeInstallPath
  40.  
  41. /* Remove us from the startup folder */
  42. ret = SysDestroyObject("<LW30_DEINSTALL>");
  43. ret = SysDestroyObject("<LW_FOLDER_TEMPLATE>");
  44. ret = SysDestroyObject("<LIVEWIRE30_MAIN_FOLDER>");
  45.  
  46. /* Delete us! */
  47. erase LWDEINST.CMD
  48.