home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / 20eval.zip / REMOVE.CMD < prev    next >
OS/2 REXX Batch file  |  1994-01-13  |  2KB  |  68 lines

  1. /* Copyright 1993 HockWare Inc. */
  2. Call RxFuncadd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  3. Call SysLoadFuncs
  4. say ''
  5. say '  VisPro/REXX (tm) by HockWare (tm) Inc.'
  6. say ''
  7. say '  This command file is used to help you remove VisPro/REXX from'
  8. say '  your system by deregistering the VisPro/REXX class objects.'
  9. say ''
  10. say '  This program does NOT remove any program files or projects'
  11. say '  that you may have created using VisPro/REXX.  This is left'
  12. say '  to the only person who can make that decision, you.  The'
  13. say '  VisPro/REXX samples are not removed, since you may have'
  14. say '  changed them.'
  15. say ''
  16. say "  You don't need to use this command file if you want to"
  17. say '  install over a previous version of VisPro/REXX.  To'
  18. say '  reinstall, you can use the SETUP program.'
  19. say ''
  20. say '  Note: before continuing, make certain that all VisPro/REXX'
  21. say '  windows are closed.  Otherwise, the removal will not work.'
  22. say ''
  23. say '  Are you sure you want to remove VisPro/REXX(Y/N)?'
  24. PARSE UPPER VALUE LINEIN() with RESPONSE
  25. IF RESPONSE<>'Y' THEN EXIT
  26. say ''
  27.  
  28. /* Check if VPForm class is active */
  29. found='FALSE'
  30. call SysQueryClassList "list."
  31. do i = list.0 to 1 by -1
  32.    parse upper var list.i class .
  33.    if class='VPFORM' then do
  34.       found='TRUE'
  35.       leave
  36.    end
  37. end
  38.  
  39. /* If VPForm active, deregister */
  40. if (found='TRUE') THEN DO
  41.    say '  Deregistering VisPro/REXX class...'
  42.    ret = SysDeregisterObjectClass( "VPForm");
  43.    if ret = 0 THEN do
  44.       say '  The VisPro/REXX class could not be deregistered.'
  45.       say '  Close all VisPro/REXX windows and retry this command.'
  46.       exit
  47.       end
  48.    else
  49.       say '  VisPro/REXX class deregistered successfully.'
  50. end
  51.  
  52. res = SysIni('SYSTEM', 'VISPROREXX', 'VERSION', 'DELETE:')
  53.  
  54. rc = SysFileDelete(OSDIR'\DLL\VPFORM.DLL')
  55. if (rc > 4) then do
  56.  
  57.    say '  The 'OSDIR'\DLL\VPFORM.DLL file could not be erased.'
  58.    say ''
  59.    say '  Perform an OS/2 Shutdown to release this DLL.'
  60.    say '  After rebooting, you can erase this DLL '
  61.    say '  by reinvoking this command file.'
  62. end
  63. else do
  64.    say '  VisPro/REXX objects were successfully deregistered.  '
  65. end
  66. EXIT
  67.  
  68.