home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / SHWINI.ZIP / SHOWINI.TXT < prev   
Text File  |  1992-06-01  |  12KB  |  288 lines

  1. Infos on SHOWINI.CMD
  2. ====================
  3.  
  4. 1) Working interactively with OS/2-INI-files
  5. ============================================
  6.  
  7. SHOWINI.CMD allows you to interactively
  8.  
  9.     a) view
  10.     b) print to text-(ASCII)-file
  11.     c) edit
  12.     d) move/copy
  13.     e) delete
  14.  
  15. Toplevel entries ("Application entries") and key-entries in OS/2-INI-files. Just
  16. enter:
  17.  
  18.      showini
  19.  
  20. Initially you will **not** see the menu choices for editing, moving/copying and
  21. deleting INI-entries for safety reasons. Also, you will get a choice to work 
  22. with OS2.INI (USER) and OS2SYS.INI (SYSTEM). With "s" for scan you can have 
  23. SHOWINI.CMD to automatically scan for valid OS/2-INI-files on all local and/or 
  24. remote drives or a specific drive, it will successfully ignore 
  25. Winodows-INI-files.
  26.  
  27. Once you configure one of the above manipulative functions the configuration 
  28. choice will be shown, if you reset them, it will not be shown anymore.  
  29. Therefore you could safely leave this program on a machine for end-users.
  30.  
  31. In order to activate the edit, move/copy and/or delete functions, you need to 
  32. enter "c" (configure) on the main menu.  This option will allways be accessible 
  33. from the INI- and TopLevel-menus, no matter whether it is displayed or not.  All 
  34. these settings will be stored in OS2.INI under the TopLevel-entry called "RGF 
  35. Showini.cmd".  Hint:  If there are many entries in an INI-file, use the 
  36. MODE-command to get more lines or more columns and/or lines:
  37.  
  38.        e.g. "MODE co80,100" for 100 lines or
  39.             "MODE co132,50" for 132 columns and 50 lines on an XGA-adapter
  40.  
  41. Hint: Wherever it is possible from the program logic, you may immeditiately end 
  42. SHOWINI.CMD by typing "q" (quit). Attention: if quitting the program, changes to
  43. the settings are not stored in OS2.INI.
  44.  
  45.  
  46. 2) Batchfile-commands
  47. =====================
  48.  
  49. SHOWINI.CMD allows for
  50.  
  51.         backing up and ***restoring*** INI-files while the system is running ! 
  52.  
  53. This means that you can backup even OS2.INI and OS2SYS.INI while the system is 
  54. up and restore them from a backup while the system is running. SHOWINI.CMD 
  55. automatically produces **10-generation** backups.
  56.  
  57.  
  58. a) BACKUP
  59. =========
  60.  
  61. syntax:
  62.  
  63.     showini /B INI-file
  64.     showini /BT INI-file
  65.  
  66. This will produce a backup-file, which is **allways** located in the drive and 
  67. subdirectory of the given INI-file.  If you do not give a drive and a path, 
  68. SHOWINI.CMD assumes that your INI-file is located in the current drive and path.  
  69. By default SHOWINI.CMD produces 10 generations of backup, thereafter deleting 
  70. the oldest to make room for the new backup.  
  71.  
  72. Depending on the switch, /B or /BT, the backup file will be an OS/2-INI-file or 
  73. a plain text-(ASCII)-file. Backups in the OS/2-INI-file format will have a filename 
  74. which corresponds to the original file-name where the last letter will be 
  75. replaced by the digits 0 thru 9, e.g. OS2.IN0, OS2.IN1, OS2.IN2, ..., OS2.IN9.
  76. Backups in the text-(ASCII)-file format will get a file-extension of TX0, TX1, TX2, ..,
  77. TX9.
  78.  
  79. examples:
  80.  
  81.       showini /b c:\os2\os2.ini
  82.               ... make a backup, the resulting backup will be of type OS/2-INI,
  83.                   and will get a name of "c:\os2\os2.in0", ..., 
  84.                   "c:\os2\os2.in9"; generations are counted from 0 to 9;
  85.                   subsequent backups will cause the backup numbered with 0 to 
  86.                   be deleted, all others backups being renamed by subtracting
  87.                   one from their number, such that the backup to be generated
  88.                   will safely get the number 9 assigned.
  89.  
  90.       showini /bt os2sys.ini
  91.               ... make a backup of the OS/2-INI-file called "os2sys.ini" located
  92.                   in the actual drive and path, the resulting backup will be of
  93.                   type TEXT (ASCII), and will get a name of "d:\os2\os2sys.tx0",
  94.                   ..., "d:\os2\os2sys.tx9", **if** the present drive and path is
  95.                   "D:\OS2"; generations are counted from 0 to 9; subsequent
  96.                   backups will cause the backup numbered with 0 to be deleted,
  97.                   all others backups being renamed by subtracting one from their
  98.                   number, such that the backup to be generated will safely get
  99.                   the number 9 assigned.
  100.  
  101.  
  102. b) RESTORE
  103. ==========
  104.  
  105. syntax:
  106.  
  107.     showini /R backup-file
  108.     showini /RT backup-file
  109.  
  110. This will restore an OS/2-INI-file from the given backup-file, which is 
  111. **allways** located in the drive and subdirectory of the INI-file to be 
  112. restored.
  113.  
  114. Depending on the switch, /R or /RT, the backup file will be an OS/2-INI-file or 
  115. a plain text-(ASCII)-file.  SHOWINI.CMD will use the filename information stored 
  116. in the backup-file (in the case of an OS/2-INI-type backup, the original 
  117. filename is stored in the TopLevel-entry "RGF Showini.cmd"), ***but*** will 
  118. ignore the stored drive and path information, instead it will use the drive and 
  119. path (for security reasons) given in the command-line (i.e.  "backup-file") !!!  
  120.  
  121. If the text-backup-file (ASCII-file) contains blank lines or ones having a 
  122. semicolon (;) as the first character, they will be ignored. 
  123.  
  124. ***Attention*** In the restore-mode all keys not being in the backup-file but 
  125. existing in the INI-file will be ***deleted*** from the OS/2-INI-file, thereby 
  126. producing an exact copy of the backup ! If you do not want this behavior use the
  127. update-mode, which just updates the TopLevels and Keys found in the backup-file.
  128.  
  129. Hint: If you want to delete numerous keys or TopLevels, then make a text-backup 
  130. (switch "/BT") and either delete or remark those lines with the appropriate 
  131. entries and run a restore-operation (using any editor like EPM, which is my 
  132. preferred one).
  133.  
  134.  
  135. examples:
  136.  
  137.       showini /r d:\apps\mamamia.in9
  138.               ... restore the OS/2-INI-file located in "D:\APPS", get the name
  139.                   of it from the backup "mamamia.in9", if not found, then assume
  140.                   that the INI-file is called "MAMAMIA.INI"; restore the 
  141.                   INI-file from the backup, delete all TopLevels and keys in
  142.                   target which are not found in the backup. The backup is a true
  143.                   OS/2-INI-file and could therefore also be copied over the
  144.                   original OS/2-INI-file. Note: drive and path information 
  145.                   stored in the backup are ignored for security reasons.
  146.  
  147.       showini /rt papatuo.tx0
  148.               ... restore the OS/2-INI-file located in the actual drive and 
  149.                   subdirectory, get the name of it from the backup
  150.                   "papatuo.tx0". Restore the INI-file from the backup, delete
  151.                   all TopLevels and keys in target which are not found in the
  152.                   backup.  The backup is a TXT-(ASCII)-file.  Note:  drive and
  153.                   path information stored in the backup are ignored for security
  154.                   reasons.
  155.  
  156.  
  157. c) UPDATE
  158. =========
  159.  
  160. syntax:
  161.  
  162.     showini /U backup-file
  163.     showini /UT backup-file
  164.  
  165. This will update an OS/2-INI-file with the information from the given 
  166. backup-file, which is **allways** located in the drive and subdirectory of the 
  167. INI-file to be restored.  
  168.  
  169. Depending on the switch, /U or /UT, the backup file will be an OS/2-INI-file or
  170. a plain text-(ASCII)-file. SHOWINI.CMD will use the filename information stored in the
  171. backup-file (in the case of an OS/2-INI-type backup, the original filename is
  172. stored in the TopLevel-entry "RGF Showini.cmd"), ***but*** will ignore the 
  173. stored drive and path information, instead it will use the drive and path (for
  174. security reasons) given in the command-line (i.e.  "backup-file") !!!  
  175.  
  176.  
  177. If the text-backup-file (ASCII-file) contains blank lines or ones having a 
  178. semicolon (;) as the first character, they will be ignored. 
  179.  
  180. examples:
  181.  
  182.       showini /u g:\aha\ok\epm.in3
  183.               ... restore the OS/2-INI-file located in "G:\AHA\OK", get the name
  184.                   of it from the backup "epm.in3", if not found, then assume
  185.                   that the INI-file is called "EPM.INI"; restore the INI-file
  186.                   from the backup. In contrast to the restore mode, superfluous
  187.                   TopLevels and keys in the target are ***not*** deleted! The
  188.                   backup is a true OS/2-INI-file and could therefore also be
  189.                   copied over the original OS/2-INI-file.  Note:  drive and path
  190.                   information stored in the backup are ignored for security
  191.                   reasons.
  192.  
  193.       showini /ut klondike.tx9
  194.               ... restore the OS/2-INI-file located in the actual drive and 
  195.                   subdirectory, get the name of it from the backup
  196.                   "klondike.tx9", if not found, then assume that the INI-file is
  197.                   called "KLONDIKE.INI"; restore the INI-file from the backup,
  198.                   delete all TopLevels and keys in target which are not found 
  199.                   in the backup.  The backup is a TXT-(ASCII)-file.  Note: 
  200.                   drive and path information stored in the backup are ignored 
  201.                   for security reasons.
  202.  
  203.  
  204. 3) EXIT-codes
  205. =============
  206.  
  207.  0 ... everything went o.k.
  208. -1 ... user aborted program
  209. -2 ... wrong switch or invalid filename
  210. -3 ... invalid backup-file
  211.  
  212.  
  213. 4) minimal layout of text-(ASCII)-backup-files
  214. ==============================================
  215.  
  216.         ; a line starting with a semi-column is a comment and is ignored
  217.         ; blank lines are ignored as well
  218.  
  219.         ; the file entry must be included and be given before the TopLevel- and
  220.         ; key-entries; it may span multiple lines (for long filenames) and has
  221.         ; the principal layout
  222.         ;
  223.         ;          "File [file name]"
  224.         ; delimiter for the value is allways an opening and ending square 
  225.         ; bracket
  226.  
  227.         File  [D:\work\klondike.ini] 
  228.         
  229.         ; A TopLevel (application) entry starts with the keyword "Top"; is being
  230.         ; followed by the datatype [A], [A0] or [H] for ASCII, ASCII-Z, resp.
  231.         ; hexadecimal; the last entry is the value enclosed in square brackets.
  232.         ; 
  233.         ; The same syntax applies to the key-names ("Key") and finally to the
  234.         ; values themselves ("Val").
  235.         ;
  236.         ; Any Value for TopLevel-names, Key-names and Key-values may span 
  237.         ; multiple lines; if so, subsequent lines must not contain a key-word,
  238.         ; but the data-type and the value.
  239.  
  240.  
  241.         Top [A]  [PATIENCE]
  242.             Key  [A]  [CardBack]
  243.  
  244.         ; the key-value is of ASCII-string, terminated by \0; note that the 
  245.         ; terminating '00'x is not contained within the value part:
  246.  
  247.                  Val  [A0] [2]
  248.  
  249.         ; the following key-value spans two lines:
  250.  
  251.             Key  [A]  [ColorSet]
  252.                  Val  [A0] [13]
  253.                       [A0] [03]
  254.         
  255.         ; this is an example for hexadecimal values for all three, 
  256.         ;TopLevel-name, key-name and key-value:
  257.  
  258.         Top [H]  [01020304050607]
  259.             Key  [H]  [08091011]
  260.                  Val  [H]  [12131415]
  261.  
  262.         ; note values enclosed in the square-bracket-delimiters may contain
  263.         ; square brackets themselves:
  264.  
  265.         Top [A]  [This is another TopLevel-entry [yes, another]]
  266.             Key  [A]  [This is another key-entry]
  267.                  Val  [A]  [This is a plain ASCII-entry.]
  268.             Key  [A]  [This is the second key-entry, within this TopLevel.]
  269.                  Val  [A0] [This is an ASCII-Z entry.]
  270.  
  271. For further examples of the syntax of the text-(ASCII)-file see any printout or
  272. text-(ASCII)-backup.
  273.         
  274.  
  275. CONCLUDING remarks
  276. ==================
  277.  
  278. Be patiened if you are running SHOWINI.CMD in batch-mode. All update- and 
  279. insert-operations on OS/2-INI-files are ***extremely*** slow ! Hopefully this 
  280. behaviour will be improved in a later release (actual release level OS/2 2.00). 
  281.  
  282.  
  283. Rony G. Flatscher,
  284. Vienna/Austria/Europe,
  285. Wirtschaftsuniversitaet Wien
  286. 1992-06-01
  287.  
  288.