home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / shwini32.zip / showini.txt < prev   
Text File  |  1993-09-20  |  14KB  |  365 lines

  1. Infos on SHOWINI.CMD
  2. ====================
  3.  
  4. SHOWINI.CMD allows you to 
  5.  
  6.       - interactively edit & print OS/2-INI-files and
  7.       - to backup/restore/update OS/2-INI-files to/from INI- or TEXT-formats
  8.       - uses ANSI-colors from procedure SCRCOL.CMD (since 1993-09-20)
  9.       - uses documented API's only (hence safe over different versions of OS/2)
  10.  
  11.  
  12. 1) Working interactively with OS/2-INI-files
  13. ============================================
  14.  
  15. SHOWINI.CMD allows you to interactively
  16.  
  17.     a) view
  18.     b) print to text-(ASCII)-file
  19.     c) edit
  20.     d) move/copy
  21.     e) delete
  22.     f) configure SHOWINI.CMD
  23.  
  24. Toplevel entries ("Application entries") and key-entries in OS/2-INI-files. Just
  25. enter:
  26.  
  27.      showini
  28.  
  29. Initially you will **not** see the menu choices for editing, moving/copying and
  30. deleting INI-entries for safety reasons. In addition there is an option to log 
  31. backup/update/restore operations; if you set this option to no an existing 
  32. logfile will be erased (it has a name of "SHOWINI.LOG" and resides in the same 
  33. directory as SHOWINI.CMD itself).
  34.  
  35. Also, you will get a choice to work with OS2.INI (USER) and OS2SYS.INI (SYSTEM).  
  36. With "s" for scan you can have SHOWINI.CMD to automatically scan for valid 
  37. OS/2-INI-files on all local and/or remote drives or a specific drive, it will 
  38. successfully ignore Winodows-INI-files.  
  39.  
  40. Once you configure one of the above manipulative functions the configuration 
  41. choice will be shown, if you reset them, it will not be shown anymore.  
  42. Therefore you could safely leave this program on a machine for end-users.
  43.  
  44. In order to activate the edit, move/copy and/or delete functions, you need to 
  45. enter "c" (configure) on the main menu.  This option will allways be accessible 
  46. from the INI- and TopLevel-menus, no matter whether it is displayed or not.  All 
  47. these settings will be stored in OS2.INI under the TopLevel-entry called "RGF 
  48. Showini.cmd".  Hint:  If there are many entries in an INI-file, use the 
  49. MODE-command to get more lines or more columns and/or lines:
  50.  
  51.        e.g. "MODE co80,100" for 100 lines or
  52.             "MODE co132,50" for 132 columns and 50 lines on an XGA-adapter
  53.  
  54. Hint: Wherever it is possible from the program logic, you may immeditiately end 
  55. SHOWINI.CMD by typing "q" (quit). Attention: if quitting the program, changes to
  56. the settings are not stored in OS2.INI.
  57.  
  58.  
  59. 2) Batchfile-commands
  60. =====================
  61.  
  62. SHOWINI.CMD allows for
  63.  
  64.         backing up and ***restoring*** INI-files while the system is running ! 
  65.  
  66. This means that you can backup even OS2.INI and OS2SYS.INI while the system is 
  67. up and restore them from a backup while the system is running. SHOWINI.CMD 
  68. by default produces **10-generation** backups.
  69.  
  70.  
  71. a) syntax:
  72. ----------
  73.  
  74.    showini /switch[generations]  {filename | /modifier}  
  75.  
  76.        switch:    B[T]   ... make a BACKUP of an OS/2-INI-file
  77.                   U[T]   ... UPDATE original OS/2-INI using a backup
  78.                   R[T]   ... RESTORE original OS/2-INI using a backup, i.e. 
  79.                              delete keys not found in backup
  80.                     T    ... backup is a text-file (i.e. ASCII-file), else 
  81.                              backup is a valid OS/2-INI-file
  82.  
  83.        generations: an optional number between 1-10, indicating how many
  84.                     backup-files you want, respectively, which backup you 
  85.                     wish to use; please note: backups will be numbered from
  86.                     0 (= 1. generation) thru 9 (= 10. generation), e.g. 
  87.                     ".IN0", ".TX9"
  88.  
  89.        filename: filename of OS/2-INI-file or the filename of the backup
  90.        --- or ---
  91.        modifier: 
  92.                 look for all OS/2-INI-files on the filesystem[s]:
  93.  
  94.                  L[OCAL]  ... only LOCAL filesystems are scanned
  95.                  R[EMOTE] ... only REMOTE filesystems are scanned
  96.                  A[LL] ...... both, LOCAL and REMOTE filesystems are scanned
  97.                  D[RIVES]:letters ... only the given driveletters are scanned,
  98.                                       where letters is e.g. ACDEH
  99.  
  100.                  process OS/2-system INI-files:
  101.  
  102.                  S[YSTEM] ... "OS2SYS.INI" affected only
  103.                  U[SER] ..... "OS2.INI" afftected only
  104.                  B[OTH] ..... both, "OS2SYS.INI" and "OS2.INI" affected
  105.  
  106.  
  107.  
  108. b) examples (pertaining to single files):
  109. -----------------------------------------
  110.  
  111.    showini /b d:\os2\os2.ini
  112.         ... make a backup of OS2.INI, resulting backup will be in an 
  113.             OS/2-INI-format ("/B") and will have an extension of ".IN0", 
  114.             ".IN1", ".IN2", ".IN3", ".IN4", ".IN5", ".IN6", ".IN7", ".IN8",
  115.             ".IN9" depending on how many backups exist already.
  116.  
  117.    showini /bt4 e:\os2\os2sys.ini
  118.         ... make a backup of OS2SYS.INI, resulting backup will be in a
  119.             TEXT-format ("/BT", i.e. ASCII, editable by any text-editor) and 
  120.             will have an extension of ".TX0", ".TX1", ".TX2", ".TX3", depending
  121.             on how many backups exist already.
  122.  
  123.             Note: There are four generations desired ("/BT4") only. In case
  124.                   there are more generations present, because beforehand you
  125.                   used the default of 10 generations, all superfluos backups
  126.                   will be deleted (oldest first) !
  127.  
  128.    showini /u c:\mamma_mia\mutter.in9
  129.         ... update "mutter.ini" according to the backup-values in "mutter.in9" 
  130.             which is in an OS/2-INI-format ("/U"). 
  131.  
  132.             Note: If "mutter.ini" does not exist, SHOWINI.CMD prompts the user
  133.                   whether to create it !
  134.  
  135.    showini /rt q:vater.tx5
  136.         ... restore "vater.ini" according to the backup-values in "vater.tx5"
  137.             which is in TEXT-format ("/RT", i.e. ASCII-format, editable by 
  138.             any text-editor).
  139.  
  140.             Note: The "restore"-operation deletes all Toplevels and Keys in the 
  141.                   original OS/2-INI-file, which are not found in the backup. If 
  142.                   you do not want to delete those entries, use the "update"-mode
  143.                   instead !
  144.  
  145.             Note: If "vater.ini" does not exist, SHOWINI.CMD prompts the user
  146.                   whether to create it !
  147.  
  148.             Note: If the name of the original OS/2-INI-file in the backup 
  149.                   "vater.tx5" is another name like "father.ini", SHOWINI.CMD 
  150.                   will work on that INI-file.
  151.  
  152. The switches B, U, R pertain to OS/2-INI-backup-files, BT, UT, RT to 
  153. TEXT-backup-files.
  154.  
  155.  
  156.  
  157. c) examples (pertaining to filesystems, or OS2.INI, OS2SYS.INI):
  158. ----------------------------------------------------------------
  159.  
  160.    showini /b /local
  161.    --- same as:
  162.    showini /b /l
  163.  
  164.         ... make a backup of all OS/2 INI-files on all local drives, resulting
  165.             backups will be in an OS/2-INI-format ("/B") and will have an
  166.             extension of ".IN0", ".IN1", ".IN2", ".IN3", ".IN4", ".IN5", 
  167.             ".IN6", ".IN7", ".IN8", ".IN9" depending on how many backups exist
  168.             already.
  169.  
  170.    showini /b5 /local
  171.    --- same as:
  172.    showini /b5 /l
  173.  
  174.         ... make a backup of all OS/2 INI-files on all local drives, resulting
  175.             backups will be in an OS/2-INI-format ("/B") and will have an
  176.             extension of ".IN0", ".IN1", ".IN2", ".IN3", ".IN4", depending on
  177.             how many backups exist already.
  178.  
  179.             Note: There are five generations desired ("/BT5") only. In case
  180.                   there are more generations present, because beforehand you
  181.                   used the default of 10 generations, all superfluos backups
  182.                   will be deleted (oldest first) !
  183.  
  184.    showini /bt /local
  185.    --- same as:
  186.    showini /bt /l
  187.  
  188.         ... make a backup of all OS/2 INI-files on all local drives, resulting
  189.             backups will be in TEXT-format ("/BT") and will have an
  190.             extension of ".TX0", ".TX1", ".TX2", ".TX3", ".TX4", ".TX5", 
  191.             ".TX6", ".TX7", ".TX8", ".TX9" depending on how many backups exist
  192.             already.
  193.  
  194.    showini /b /remote
  195.    --- same as:
  196.    showini /b /r
  197.  
  198.         ... make a backup of all OS/2 INI-files on all remote drives, resulting
  199.             backups will be in an OS/2-INI-format ("/B") and will have an
  200.             extension of ".IN0", ".IN1", ".IN2", ".IN3", ".IN4", ".IN5", 
  201.             ".IN6", ".IN7", ".IN8", ".IN9" depending on how many backups exist
  202.             already.
  203.  
  204.    showini /bt1 /all
  205.    --- same as:
  206.    showini /bt1 /a
  207.  
  208.         ... make a backup of all OS/2 INI-files on all drives, local and remote,
  209.             resulting backups will be in TEXT-format ("/BT") and will have an
  210.             extension of ".TX0".
  211.  
  212.             Note: There is one generation desired ("/BT1") only. In case there
  213.                   are more generations present, because beforehand you used more
  214.                   than one generation, all superfluos backups will be deleted
  215.                   (oldest first) !
  216.  
  217.    showini /b /drives:adf
  218.    --- same as:
  219.    showini /b /d:adf
  220.  
  221.         ... make a backup of all OS/2 INI-files on drives "A", "D", "F",
  222.             resulting backups will be in an OS/2-INI-format ("/B") and will have
  223.             an extension of ".IN0", ".IN1", ".IN2", ".IN3", ".IN4", ".IN5",
  224.             ".IN6", ".IN7", ".IN8", ".IN9" depending on how many backups exist
  225.             already.
  226.  
  227.  
  228.     showini /u /a
  229.  
  230.         ... update all OS/2-INI-files found on all drives, remote and local, 
  231.             with backups in OS/2-INI-format. 
  232.  
  233.             Note: The latest backup will be used for updating the original 
  234.                   OS/2-INI-files.
  235.  
  236.     showini /ut5 /a
  237.  
  238.         ... update all OS/2-INI-files found on all drives, remote and local, 
  239.             with backups in TEXT-format. SHOWINI.CMD uses the 5th backup
  240.             (i.e. extension ".TX4"), if not found any backup which is before the
  241.             5th.
  242.  
  243.  
  244.     showini /r /a
  245.  
  246.         ... update all OS/2-INI-files found on all drives, remote and local, 
  247.             with backups in OS/2-INI-format.
  248.  
  249.             Note: The "restore"-operation deletes all Toplevels and Keys in the 
  250.                   original OS/2-INI-file, which are not found in the backup. If 
  251.                   you do not want to delete those entries, use the "update"-mode
  252.                   instead !
  253.  
  254.             Note: The latest backup will be used for updating the original 
  255.                   OS/2-INI-files.
  256.  
  257.  
  258.    showini /b /user
  259.    --- same as:
  260.    showini /b /u
  261.  
  262.         ... backup "OS2.INI".
  263.  
  264.    showini /rt4 /system
  265.    --- same as:
  266.    showini /rt4 /s
  267.  
  268.         ... restore "OS2SYS.INI" from a TEXT-backup. Use the fourth, if not 
  269.             found a younger, generation.
  270.  
  271.    showini /ut /both
  272.    --- same as:
  273.    showini /ut /b
  274.  
  275.         ... update both, "OS2.INI" and "OS2SYS.INI", with the latest 
  276.             TEXT-backup.
  277.  
  278. 3) EXIT-codes
  279. =============
  280.  
  281.  0 ... everything went o.k.
  282. -1 ... user aborted program
  283. -2 ... wrong switch or invalid filename
  284. -3 ... invalid backup-file
  285.  
  286.  
  287. 4) minimal layout of text-(ASCII)-backup-files
  288. ==============================================
  289.  
  290.         ; a line starting with a semi-column is a comment and is ignored
  291.         ; blank lines are ignored as well
  292.  
  293.         ; the file entry must be included and be given before the TopLevel- and
  294.         ; key-entries; it may span multiple lines (for long filenames) and has
  295.         ; the principal layout
  296.         ;
  297.         ;          "File [file name]"
  298.         ; delimiter for the value is allways an opening and ending square 
  299.         ; bracket
  300.  
  301.         File  [D:\work\klondike.ini] 
  302.         
  303.         ; A TopLevel (application) entry starts with the keyword "Top"; is being
  304.         ; followed by the datatype [A], [A0] or [H] for ASCII, ASCII-Z, resp.
  305.         ; hexadecimal; the last entry is the value enclosed in square brackets.
  306.         ; 
  307.         ; The same syntax applies to the key-names ("Key") and finally to the
  308.         ; values themselves ("Val").
  309.         ;
  310.         ; Any Value for TopLevel-names, Key-names and Key-values may span 
  311.         ; multiple lines; if so, subsequent lines must not contain a key-word,
  312.         ; but the data-type and the value.
  313.  
  314.  
  315.         Top [A]  [PATIENCE]
  316.             Key  [A]  [CardBack]
  317.  
  318.         ; the key-value is of ASCII-string, terminated by \0; note that the 
  319.         ; terminating '00'x is not contained within the value part:
  320.  
  321.                  Val  [A0] [2]
  322.  
  323.         ; the following key-value spans two lines:
  324.  
  325.             Key  [A]  [ColorSet]
  326.                  Val  [A0] [13]
  327.                       [A0] [03]
  328.         
  329.         ; this is an example for hexadecimal values for all three, 
  330.         ;TopLevel-name, key-name and key-value:
  331.  
  332.         Top [H]  [01020304050607]
  333.             Key  [H]  [08091011]
  334.                  Val  [H]  [12131415]
  335.  
  336.         ; note values enclosed in the square-bracket-delimiters may contain
  337.         ; square brackets themselves:
  338.  
  339.         Top [A]  [This is another TopLevel-entry [yes, another]]
  340.             Key  [A]  [This is another key-entry]
  341.                  Val  [A]  [This is a plain ASCII-entry.]
  342.             Key  [A]  [This is the second key-entry, within this TopLevel.]
  343.                  Val  [A0] [This is an ASCII-Z entry.]
  344.  
  345. For further examples of the syntax of the text-(ASCII)-file see any printout or
  346. text-(ASCII)-backup.
  347.         
  348.  
  349. CONCLUDING remarks
  350. ==================
  351.  
  352. Be patiened if you are running SHOWINI.CMD in batch-mode. All update- and 
  353. insert-operations on OS/2-INI-files are ***extremely*** slow ! Hopefully this 
  354. behaviour will be improved in a later release (actual release level OS/2 2.00). 
  355. For the release level 2.0 beware of using SHOWINI.CMD without applying the CSD 
  356. for REXX from IBM (e.g. found on hobbes, Compuserve etc.).
  357.  
  358.  
  359.  
  360. Rony G. Flatscher,
  361. Vienna/Austria/Europe,
  362. Wirtschaftsuniversitaet Wien
  363. 1992-07-01
  364.  
  365.