home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: OtherApp / OtherApp.zip / ellie03.zip / DeReg.cmd < prev    next >
OS/2 REXX Batch file  |  1999-07-06  |  3KB  |  90 lines

  1. /* ╔═════════════════╤══════════════════════════════════════════════════════════╗
  2.    ║ File last saved │19 Jun 1999 at 09:31:39 []                                ║
  3.    ╟─────────────────┼──────────────────────────────────────────────────────────╢
  4.    ║        Filename │DeReg.cmd                                                 ║
  5.    ║         Created │19 Jun 1999 at 07:57:27                                   ║
  6.    ║         Comment │Deregisters Ellie from a System                           ║
  7.    ║                 │                                                          ║
  8.    ╚═════════════════╧══════════════════════════════════════════════════════════╝
  9. */
  10.  
  11.  
  12. if LoadRexxUtil() then exit 88
  13.  
  14. currver = SysIni(, 'AiG', 'Ellie_Ver')
  15. if currver = 'ERROR:' then do
  16.     say '   Notice!:Ellie is not registered on this system..'
  17.     currver = '(No Version)'
  18. end
  19. say '   ─────────────────────────────────────────────────────────────────────'
  20. say '   ** Deregister Ellie' currver 'from this system **'
  21. say
  22. say '   This program removes references to Ellie in OS2.INI and destroys'
  23. say '   the Ellie folder (and anything contained within it!!!!)' '07'x
  24. say '   ─────────────────────────────────────────────────────────────────────'
  25. say '   Are you sure you want to continue..?' '07'x
  26. call charout, '   Type YES to continue >___' || copies('08'x,3)
  27.  
  28. pull ky
  29. select
  30.     when translate(ky) = 'YES' then
  31.         call Process
  32.     otherwise
  33.         say '   Aborted!'
  34. end
  35. say '   Program finished.'
  36. EXIT
  37.  
  38.  
  39. Process:
  40. EllieObj.0 = 3
  41.  
  42. EllieObj.1 = '<AIG_ELLIE>'          ; EllieObjd.1  = '   Ellie program object'
  43. EllieObj.2 = '<AIG_ELLIE_SETIEXE>'  ; EllieObjd.2  = '   Ellie SETI client object'
  44. EllieObj.3 = '<AIG_ELLIE_FLDR>'     ; EllieObjd.3  = '   Ellie folder object'
  45.  
  46.  
  47. do i = 1 to EllieObj.0
  48.  
  49.     if SysDestroyObject(EllieObj.i) = 1 then
  50.         say left(EllieObjd.i, 30) ':' EllieObj.i 'destroyed..'
  51.     else
  52.         say left(EllieObjd.i, 30) ':' EllieObj.i 'has NOT been destroyed!!'
  53.     call SysSleep 1
  54. end
  55.  
  56. say '  ' EllieObj.0 'objects processed.'
  57. say '   Removing OS2.INI references...'
  58.  
  59. app = 'AiG'
  60. ky1 = 'Ellie_Home'
  61. ky2 = 'Ellie_Ver'
  62. if SysIni(, app, ky1, 'DELETE:') <> 'ERROR:' then
  63.     say '   Ellie_Home removed.'
  64. else
  65.     say '   Unable to remove Ellie_Home key from OS2.INI!' '07'x
  66.  
  67. if SysIni(, app, ky2, 'DELETE:') <> 'ERROR:' then
  68.     say '   Ellie_Ver removed.'
  69. else
  70.     say '   Unable to remove Ellie_Ver key from OS2.INI!' '07'x
  71.  
  72.  
  73. say
  74. say '   To remove this program entirely from your system, delete all files'
  75. say '   in the Ellie directory.'
  76.  
  77. return
  78.  
  79. LoadRexxUtil: procedure
  80. if rxFuncQuery('SysLoadFuncs') then do
  81.     if rxFuncAdd('SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs') then do
  82.         say 'Installation Error! Unable to load RexxUtil library.' '07'x
  83.         say 'Please check that you have Rexx installed on your system.' '07'x
  84.         return 1; end
  85.     call SysLoadFuncs
  86. end
  87. return 0
  88.  
  89.  
  90.