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