home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / orexx.zip / ZAPINI.CMD < prev   
OS/2 REXX Batch file  |  1998-03-25  |  3KB  |  61 lines

  1. /******************************************************************************/
  2. /* Object REXX                                                     zapini.cmd */
  3. /*                                                                            */
  4. /* Licensed Materials - Property of IBM                                       */
  5. /* (C) Copyright IBM Corp. 1996. All Rights Reserved.                         */
  6. /*                                                                            */
  7. /* U.S. Government Users Restricted Rights - Use, duplication or disclosure   */
  8. /* restricted by GSA ADP Schedule Contract with IBM Corp.                     */
  9. /*                                                                            */
  10. /* Remove old entries of Object REXX from Software Installer INI files in     */
  11. /* case of problems.                                                          */
  12. /*                                                                            */
  13. /* Calling parameters:                                                        */
  14. /*      ZAPINI d:                                                             */
  15. /*         where d: is the drive where EPFIS.INI is located (defaults to C:)  */
  16. /*                                                                            */
  17. /******************************************************************************/
  18.  
  19. Parse Arg DriveLetter
  20.  
  21. If DriveLetter = '' Then
  22.   DriveLetter = 'C:\'
  23.  
  24. If SubStr(DriveLetter, Length(DriveLetter), 1) != '\' Then
  25.   DriveLetter = DriveLetter || '\'
  26.  
  27. Call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  28. Call SysLoadFuncs
  29.  
  30. SearchFileSpec = DriveLetter || 'EPFIS.INI'
  31. Call SysFileTree SearchFileSpec, 'FILES.', 'FS'
  32.  
  33. If Files.0 = 0 Then
  34.   Do
  35.     Say "Couldn't locate EPFIS.INI in drive/directory" DriveLetter
  36.     Say "Please specify the drive or directory where this file is located"
  37.     Say "(normally your boot drive) as the first parameter to ZAPINI.CMD."
  38.     Exit
  39.   End
  40.  
  41. Parse Var Files.1 Date Time Size Attribs FileName
  42. Drop Files
  43. FileName = Strip(FileName)
  44.  
  45. If SysIni(FileName, 'ALL:', 'APPS') \= 'ERROR:' Then
  46.   Do
  47.     Do i = 1 To APPS.0
  48.       If POS('Object REXX', APPS.i) \= 0 Then
  49.         Do
  50.           If SysIni(FileName, APPS.i, 'DELETE:') \= 'ERROR:' Then
  51.             Say "Object REXX entries successfully deleted from EPFIS.INI"
  52.           Else
  53.             Say "Error deleting Object REXX entries from EPFIS.INI."
  54.  
  55.           Exit
  56.         End
  57.     End
  58.   End
  59.  
  60. Say "No entry for Object REXX found in EPFIS.INI"
  61.