home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 6 File / 06-File.zip / fm2_267.zip / uninstal.cmd < prev    next >
OS/2 REXX Batch file  |  1996-03-12  |  3KB  |  88 lines

  1. /*
  2.  * FM/2 2.x deinstallation program copyright (c) 1994/95 by M. Kimes
  3.  *
  4.  * This program removes the FM/2 folder and any OS2USER.INI records
  5.  * for FM/2.  Optionally it will wipe all files and remove all directories
  6.  * created by the FM/2 installation program.  Run from the FM/2 directory.
  7.  *
  8.  * For unattended use, remove the lines marked with "NOTE:" below and
  9.  * see note at bottom of program.
  10.  */
  11.  
  12. '@Echo off'
  13. 'cls'
  14. 'echo  ┌───────────────────────────────────────────────────────────────────┐'
  15. 'echo  │                 FM/2 2.x Deinstallation Program                   │'
  16. 'echo  │             FM/2 is copyright (c) 1993-95 by M. Kimes             │'
  17. 'echo  │                       All rights reserved                         │'
  18. 'echo  └───────────────────────────────────────────────────────────────────┘'
  19.  
  20. /* see if we might be in the right directory... */
  21.  
  22. curdir = directory()
  23.  
  24. rc = stream('fm3.exe','c','query exists')
  25. if rc = '' then
  26. do
  27.   say 'Sorry, FM3.EXE not found.  Must not be right directory.  Terminating.'
  28.   exit
  29. end
  30.  
  31. /* tell user what we're doing, give him a chance to hit CTRL-C */
  32.  
  33. say ''
  34. say ' **WARNING:  This program uninstalls FM/2.'
  35. say ''
  36.  
  37.  
  38. /* NOTE:  remove following 3 lines for unattended use... */
  39. say 'Press [Enter] (or CTRL-C then [Enter] to abort).'
  40. Pull dummy .
  41. say ''
  42.  
  43.  
  44. /* load rexx utility functions */
  45.  
  46. call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  47. call SysLoadFuncs
  48.  
  49. say 'Working...'
  50.  
  51. /* remove FM/2 folder object */
  52. call SysDestroyObject "<FM3_Folder>"
  53.  
  54. /* remove all FM/2-related information from user ini file */
  55. call SysIni 'USER', 'FM/2'
  56. call SysIni 'USER', 'FM2'
  57.  
  58. /* done */
  59.  
  60. say ''
  61. /* NOTE:  remove following lines for unattended use... */
  62. say "Delete programs and directories "curdir
  63. say "and "curdir"\utils"
  64. say "as follows, and then you're done:"
  65. say "CD\"
  66. say "DEL "curdir"\UTILS\*"
  67. say "RMDIR "curdir"\UTILS"
  68. say "DEL "curdir"\*"
  69. say "RMDIR "curdir
  70. say ""
  71. say "Shall I perform these tasks for you?"
  72. parse upper pull dummy
  73. if left(dummy,1) = 'Y' then
  74. do
  75.   /* NOTE:  Keep this section for unattended use... */
  76.   'CD\'
  77.   '@ECHO ON'
  78.   'ECHO Y | DEL 'curdir'\UTILS\* && RD 'curdir'\UTILS'
  79.   'ECHO Y | DEL 'curdir'\* && RD 'curdir
  80.   '@ECHO OFF'
  81. end
  82. else say "Okay, it's a simple enough operation that even a human can do it. :-)"
  83. say ""
  84. say "Don't forget to remove any PATH statements from CONFIG.SYS that you"
  85. say "entered for FM/2 or its utilities."
  86. say ""
  87. say "I'm done now."
  88.