home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1999 November / PCONLINE_11_99.ISO / filesbbs / OS2 / ACDCR032.ZIP / uninstall.CMD < prev    next >
Encoding:
Text File  |  1999-08-22  |  3.7 KB  |  132 lines

  1. /*                 Uninstall the Audio-CD-Folder/Data-CD-Folder
  2.  *
  3.  *                   (C) Chris Wohlgemuth 1999
  4. */
  5.  
  6. /*
  7.  * This program is free software; you can redistribute it and/or modify
  8.  * it under the terms of the GNU General Public License as published by
  9.  * the Free Software Foundation; either version 2, or (at your option)
  10.  * any later version.
  11.  *
  12.  * This program is distributed in the hope that it will be useful,
  13.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15.  * GNU General Public License for more details.
  16.  *
  17.  * You should have received a copy of the GNU General Public License
  18.  * along with this program; see the file COPYING.  If not, write to
  19.  * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  20.  */
  21.  
  22.  call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  23.  call SysLoadFuncs
  24.  
  25. 'cls'
  26. say ''
  27. Say 'About to uninstall the Audio-CD-Creator'
  28. Say 'and Data-CD-Creator'
  29. Say '(c) Chris Wohlgemuth 1998-99'
  30. say 'This program and all files are released under the GPL'
  31. say 'See file ''Copying'' for information.'
  32. say ''
  33.  
  34. say 'Press <ENTER> to uninstall or Ctrl-c to abort now.'
  35. say ''
  36. say '>'
  37. parse value SysCurPos() with aktzeile aktspalte
  38. newposition=SysCurPos(aktzeile-1,2)
  39. pull
  40.  
  41. /* Clear screen */
  42. 'cls'
  43.  
  44. /* Get curent directory */
  45. curdir = directory()
  46.  
  47. say 'Current directory is' curdir
  48. say ''
  49.  
  50. /* Query bootdrive */
  51. say 'Quering boot drive...'
  52. parse upper value VALUE('PATH',,'OS2ENVIRONMENT') with '\OS2\INSTALL' -2 boot +2
  53. parse upper value VALUE('PATH',,'OS2ENVIRONMENT') with '\OS2\SYSTEM' -2 boot2 +2
  54. say ''
  55. if boot=boot2 then say 'Bootdrive seems to be' boot
  56. say 'Enter ''y'' to confirm or the real bootdrive letter'
  57. say ''
  58. say '>'
  59. parse value SysCurPos() with aktzeile aktspalte
  60. newposition=SysCurPos(aktzeile-1,2)
  61. parse pull in
  62.  
  63. if in='y'|in='Y'  then boot=boot
  64. else boot=in':'
  65.  
  66.  
  67. /* Clear screen */
  68. 'cls'
  69.  
  70. progfolderdll=boot'\os2\dll\progfldr.dll' /* Build progfldr.dll path */
  71. helppath=boot'\os2\help\aucdfldr.hlp'
  72.  
  73. say ''
  74. say ''
  75. say 'Deleting CD-Writing-Utilities folder...'
  76. if SysDestroyObject('<CD_WRITING>') <>1 then
  77.     say 'Can''t delete the folder.'
  78.  
  79. say 'Deleting the Audio-CD-Creator template in the templates folder...'
  80. if SysCreateObject("CWAudioFolder","<AUDIOCD_CREATOR>","<WP_TEMPS>","NODELETE=NO;TEMPLATE=NO","update") then
  81.       if SysDestroyObject('<AUDIOCD_CREATOR>') <>1 then
  82.     say 'Can''t delete the template.'
  83.  
  84. say 'Deleting the Data-CD-Creator template in the templates folder...'
  85. if SysCreateObject("CWDataFolder","<DATACD_CREATOR>","<WP_TEMPS>","NODELETE=NO;TEMPLATE=NO","update") then
  86.       if SysDestroyObject('<DATACD_CREATOR>') <>1 then
  87.     say 'Can''t delete the template.'
  88.  
  89. say 'Deregistering class ''CWAudioFolder'''
  90.         if SysDeregisterObjectClass("CWAudioFolder") <>1 then
  91.         do
  92.           say 'Error while deregistering class ''CWAudioFolder'''
  93.                   say 'Exiting...'
  94.           exit
  95.          end
  96.  
  97. say 'Deregistering class ''CWDataFolder'''
  98.         if SysDeregisterObjectClass("CWDataFolder") <>1 then
  99.         do
  100.           say 'Error while deregistering class ''CWDataFolder'''
  101.           say 'Exiting...'
  102.           exit     
  103.         end
  104.  
  105. say 'Deregistering class ''CWProgFolder'''
  106.         if SysDeregisterObjectClass("CWProgFolder") <>1 then
  107.         do
  108.           say 'Error while deregistering class ''CWProgFolder'''
  109.           say 'Exiting...'
  110.           exit     
  111.         end
  112. say 'deleting helpfile: 'helppath
  113. del helppath
  114.  
  115. say ''
  116. say 'After reboot delete the file 'progfolderdll' and this directory.'
  117.  
  118.  
  119. say ''
  120. say 'The Audio-CD-Creator was uninstalled succesful.'
  121. say ''
  122.  
  123. say 'Press <ENTER> to quit.'
  124. say ''
  125. say '>'
  126. parse value SysCurPos() with aktzeile aktspalte
  127. newposition=SysCurPos(aktzeile-1,2)
  128. pull
  129.  
  130. exit
  131.  
  132.