home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / dialip2.zip / showini.cmd < prev    next >
OS/2 REXX Batch file  |  1998-01-01  |  1KB  |  61 lines

  1. /**/
  2. /* run with 1 argument = ini file to look at */
  3. /* for example: showini c:\mptn\etc\tcpos2.ini          - Internet 
  4. 'Other' dialer info. */
  5. /* for example: showini d:\spllmstr\spllmstr.ini */
  6.  
  7. showapp = ''
  8.  
  9. parse arg inifile showapp
  10.  
  11. say 'inifile ='inifile'='
  12. say 'showapp ='showapp'='
  13.  
  14. if ( showapp = 'all' ) then
  15.     showapp = 'ALL'
  16.  
  17. if ( inifile = '' ) then
  18.     Do
  19.     say 'Run with 1 argument (name of an *.ini file) to show'
  20.     say 'or 2 arg.s (name of an *.ini file) to show and app name to show'
  21.     exit
  22.     End
  23.  
  24. call sysini inifile, 'ALL:', 'apps.'
  25. say "apps.0 ="apps.0
  26. if ( result \= 'ERROR:' ) then
  27.     Do i = 1 to apps.0
  28.     call sysini inifile, apps.i, 'ALL:', 'keys'
  29.     say "app ="apps.i   "keys.0 ="keys.0
  30.     if ( showapp = '' | ( showapp \= 'ALL' & apps.i \= showapp ) ) then
  31.         iterate i
  32.     else
  33.         Do
  34.         do c = 1 to keys.0
  35.             say apps.i"["i"]"keys.c"["c"] =" sysini( inifile, apps.i, keys.c )"="
  36.         End
  37.     end /* do */
  38.  
  39. /** Uncommenting out the lines below will let you delete ini file items!
  40.       VERY DANGEROUS unless you know what you are doing
  41. **/
  42. /**    say 'Delete whole app.' apps.i '?'**/
  43.  
  44. /**
  45.     say 'hit return'
  46.     parse pull ans
  47. **/
  48.  
  49. /**
  50.     if ( ans ='Y' ) then
  51.         Do
  52.         say 'Deleting whole app.'
  53.         call sysini inifile, apps.i, 'DELETE:'
  54.         End
  55. **/
  56.     end
  57.  
  58. RETURN
  59.  
  60.  
  61.