home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: SysTools / SysTools.zip / mse.zip / uninstal.cmd < prev   
OS/2 REXX Batch file  |  1998-02-15  |  3KB  |  93 lines

  1. /*
  2.  * MSE deinstallation program
  3.  *
  4.  * Run with /Y argument to avoid being asked if you're sure.
  5.  */
  6. '@Echo off'
  7. 'cls'
  8. /* tell the nice people who we are */
  9. say ''
  10. say ' ┌────────────────────────────────────────────────────────────────────────────┐'
  11. say ' │                                                                            │'
  12. say ' │            MSE Mouse and System Enhancer deinstallation program            │'
  13. say ' ├────────────────────────────────────────────────────────────────────────────┤'
  14. say ' │                     MSE copyright (c) 1997/8 by M. Kimes                   │'
  15. say ' │                             all rights reserved                            │'
  16. say ' │                                                                            │'
  17. say ' └────────────────────────────────────────────────────────────────────────────┘'
  18. say ''
  19. /* get current directory */
  20. curdir = directory()
  21. /* see if we have what we need to kill off */
  22. rc = stream('msehook.dll','c','query exists')
  23. if rc = '' then
  24. do
  25.   say 'Sorry, MSEHOOK.DLL not found.  Must not be right directory.  Terminating.'
  26.   exit
  27. end
  28. rc = stream('mse.exe','c','query exists')
  29. if rc = '' then
  30. do
  31.   say 'Sorry, MSE.EXE not found.  Must not be right directory.  Terminating.'
  32.   exit
  33. end
  34. /* load system utility functions */
  35. call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  36. call SysLoadFuncs
  37.  
  38. /* skip input? */
  39. dummy = ''
  40. parse upper arg dummy
  41. select
  42.   when dummy = '/Y'
  43.     then dummy = 'Y'
  44. otherwise
  45. do
  46.   /* be sure they meant it */
  47.   call charout ,"Remove MSE from your system? [Y/N] "
  48.   /* get input */
  49.   dummy = ''
  50.   do forever
  51.     dummy = SysGetKey('NOECHO')
  52.     parse upper var dummy dummy
  53.     if dummy = '1b'x then dummy = 'N'
  54.     if dummy = '0d'x then dummy = 'Y'
  55.     if dummy = 'N' then leave
  56.     if dummy = 'Y' then leave
  57.   end
  58.   call charout ,dummy
  59.   say ''
  60. end
  61. end
  62.  
  63. /* well, did they really mean it? */
  64. if dummy = 'N' then exit
  65. /* disembowel ourself */
  66. 'mse /k'
  67. call SysSleep 2
  68. call SysDestroyObject "<MSE_START>"
  69. call SysDestroyObject "<MSE_DESKTOP>"
  70. 'del mse.ini 1>NUL 2>NUL'
  71. 'del install.cmd 1>NUL 2>NUL'
  72. 'del exclude.lst 1>NUL 2>NUL'
  73. 'del read.me 1>NUL 2>NUL'
  74. 'del msemenu?.dat 1>NUL 2>NUL'
  75. 'del mse.inf 1>NUL 2>NUL'
  76. 'del aftrscrn.cmd 1>NUL 2>NUL'
  77. 'del file_id.diz 1>NUL 2>NUL'
  78. 'del register.txt 1>NUL 2>NUL'
  79. 'del purchase.exe 1>NUL 2>NUL'
  80. 'del purchase.app 1>NUL 2>NUL'
  81. 'del SCRNSHTS\scrn???.bmp 1>NUL 2>NUL'
  82. 'rmdir SCRNSHTS 1>NUL 2>NUL'
  83. 'del files.lst 1>NUL 2>NUL'
  84. 'del dirs.lst 1>NUL 2>NUL'
  85. 'del mse.exe 1>NUL 2>NUL'
  86. 'del msehook.dll 1>NUL 2>NUL'
  87. cd..
  88. /* tell the nice people we're done */
  89. say 'MSE deinstallation is complete.  Remove MSE directory '
  90. say curdir' if desired with RD or DELTREE.'
  91. /* now blow our brains out all over the wall */
  92. 'del 'curdir'\uninstal.cmd'
  93.