home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: InfoMgt / InfoMgt.zip / datagui1.zip / ZAPINI.CMD < prev   
OS/2 REXX Batch file  |  1993-10-26  |  2KB  |  68 lines

  1. /********************************************************************************
  2. **                      SOFTWARE INSTALLER
  3. ** 5621-434 (C) COPYRIGHT IBM CORP. 1991, 1993. ALL RIGHTS RESERVED.
  4. **             LICENSED MATERIALS - PROPERTY OF IBM
  5. *********************************************************************************
  6. **
  7. ** ZAPINI.CMD -- Delete history information saved by Software Installer for OS/2.
  8. **
  9. ********************************************************************************/
  10.  
  11. trace 'o'
  12. parse arg INIDir',' Name',' Number',' Feature
  13.  
  14. /* Remove leading/trailing spaces */
  15. INIDir  = strip(INIDir)
  16. Name    = strip(Name)
  17. Number  = strip(Number)
  18. Feature = strip(Feature)
  19.  
  20. /* Check for required parms */
  21. if INIDir  = '' |,
  22.    Name    = '' |,
  23.    Number  = '' |,
  24.    Feature = ''
  25. then do
  26.    say
  27.    say 'Descr:    Deletes history information saved by Software Installer for OS/2'
  28.    say
  29.    say 'Syntax:   ZAPINI INIDir, Name, Number, Feature'
  30.    say 'Where:    INIDir : drive and directory where EPFIS.INI is located'
  31.    say '          Name   : value of PACKAGE.Name'
  32.    say '          Number : value of PACKAGE.Number'
  33.    say '          Feature: value of PACKAGE.Feature'
  34.    say 'All parameters are comma delimited.'
  35.    say
  36.    say 'Example:  ZAPINI c:\os2\system, Software Installer, 5621-434, 0000'
  37.    exit
  38. end   /* then */
  39.  
  40. /* Load the SysIni function */
  41. call rxfuncadd sysini, rexxutil, sysini
  42.  
  43. /* Build the fully-qualified INI name */
  44. if right(INIDir, 1) = '\'
  45. then INI = INIDir||'epfis.ini'
  46. else INI = INIDir||'\epfis.ini'
  47.  
  48. /* Create the application key */
  49. App = 'EPFINST_'Name'_'Number'_'Feature
  50.  
  51. /* Delete all application keys            */
  52. /* The return code is purposely ignored   */
  53. /* as SysINI() doesn't return it properly */
  54. rc = SysIni(INI, App, 'DELETE:')
  55.  
  56. say
  57. say 'All records have been deleted:'
  58. say '   From:   ' INI
  59. say '   Name:   ' Name
  60. say '   Number: ' Number
  61. say '   Feature:' Feature
  62. say
  63.  
  64. /* Drop the SysIni function */
  65. call rxfuncdrop sysini
  66.  
  67. exit
  68.